An AWS Lambda function is invoked asynchronously to process events, but some invocations fail intermittently. The developer needs to capture and analyze these failed events to troubleshoot, with minimal development effort. What should the developer do?
Choose an answer
Tap an option to check your answer.
Correct answer: Configure a dead-letter queue (DLQ) so failed asynchronous invocations are sent to an Amazon SQS standard queue for later inspection..
Why this is the answer
Configuring a Dead-Letter Queue (DLQ) for the Lambda function is the most effective solution. When a Lambda function is invoked asynchronously and fails after all retries, the event is sent to the configured DLQ. An Amazon SQS standard queue is ideal for this purpose as it reliably stores messages for later processing and analysis, allowing developers to inspect the failed events and understand the cause of failure with minimal development effort. Adding logging statements and searching CloudTrail logs is less efficient for capturing specific failed events, as CloudTrail logs API calls, not application-level errors within Lambda. Launching an AWS Step Functions workflow is an orchestration solution for complex workflows and retries, not a direct mechanism for capturing failed asynchronous invocation events for analysis. Using an Amazon SNS FIFO topic for a DLQ is incorrect because SNS FIFO topics are designed for ordered, deduplicated messaging, not as a general-purpose dead-letter queue for asynchronous Lambda invocations, and SQS standard queues are more appropriate for this use case.
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