A Lambda function named ProcessMessages is invoked asynchronously when messages are published to an SNS topic called InputTopic. The team uses a second SNS topic, ErrorTopic, to receive failure alerts. The developer wants to get notifications to ErrorTopic whenever ProcessMessages fails to process a message. What should they configure?
Choose an answer
Tap an option to check your answer.
Correct answer: Configure a failure (destination) setting for the ProcessMessages Lambda and set the destination ARN to the ErrorTopic SNS topic..
Why this is the answer
Configuring a failure destination for the Lambda function is the correct approach. When a Lambda function is invoked asynchronously and fails (e.g., due to an unhandled exception or exceeding retries), AWS Lambda can automatically send details about the failed invocation to a configured destination. By setting the ErrorTopic SNS topic as the failure destination, the team will receive notifications whenever ProcessMessages encounters an error. The other options are incorrect: Subscribing ProcessMessages to ErrorTopic with a filter policy would mean the Lambda is invoked by ErrorTopic, not that ErrorTopic receives failure notifications from the Lambda. Adding ErrorTopic as a trigger for ProcessMessages would cause ProcessMessages to be invoked when messages are published to ErrorTopic, which is the opposite of the desired flow. Attaching a delivery policy to ErrorTopic is used to control how messages are delivered to subscribers of ErrorTopic, not to configure ErrorTopic as a failure destination for a Lambda function.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed