How to collect failed Lambda async events?

DVA-C02 By islever Editorial Last updated

Short answer

C Add a dead-letter queue to send messages to an Amazon Simple Queue Service (Amazon SQS) standard queue.

Question

An AWS Lambda function is invoked asynchronously to process events. Occasionally, the Lambda function falls to process events. A developer needs to collect and analyze these failed events to fix the issue. What should the developer do to meet these requirements with the LEAST development effort?
  1. Add logging statements for all events in the Lambda function. Filter AWS CloudTrail logs for errors.
  2. Configure the Lambda function to start an AWS Step Functions workflow with retries for failed events.
  3. Add a dead-letter queue to send messages to an Amazon Simple Queue Service (Amazon SQS) standard queue. Correct Answer
  4. Add a dead-letter queue to send messages to an Amazon Simple Notification Service (Amazon SNS) FIFO topic.

Key Takeaways

This question tests knowledge of Lambda DLQ compatibility, specifically that standard SQS queues are supported while SNS FIFO topics are not.

To handle asynchronous invocation failures in AWS Lambda with minimal code, developers should configure a Dead-Letter Queue (DLQ). The community consensus confirms that using an Amazon SQS standard queue as the DLQ is the correct approach.

Common mistake: Choosing option D is a common mistake because users might not recall that AWS Lambda DLQs do not support SNS FIFO topics.

Expert Analysis

Why the Answer Is Correct

Option C is correct because Lambda's native Dead-Letter Queue (DLQ) feature is designed specifically to capture and retain event payloads for asynchronous invocations that fail processing. Configuring an SQS standard queue requires minimal development effort, simply involving a configuration change in the Lambda console or CLI.

Why the Other Options Are Wrong

Option A is incorrect because CloudTrail logs API calls, not the internal processing failures of asynchronous events, and filtering these logs is inefficient. Option B involves too much overhead and development effort compared to a simple DLQ. Option D is invalid because Lambda DLQs explicitly do not support SNS FIFO (First-In-First-Out) topics.

Community Comment Notes

Commenters highlighted the specific compatibility constraint regarding FIFO SNS topics, reinforcing why option D is invalid. The community emphasizes that a DLQ in SQS is the standard, low-effort solution for debugging async failures.

Official Reference

Exam Strategy

Always remember the "Least Development Effort" keyword in AWS questions. Native features like DLQs are preferred over custom logging or complex orchestration workflows like Step Functions for simple error handling.

Community Votes

C
100%

100% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 4 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 4

  1. komorebi 👍 3
    C. Add a dead-letter queue to send messages to an Amazon Simple Queue Service (Amazon SQS) standard queue.
  2. 0bdf3af 👍 1 Answered C
    C. SQS The dead letter queue specified for the Lambda function is not compatible with the FIFO (First-In-First-Out) SNS topic. FIFO SNS topics are not supported for dead letter configuration in AWS Lambda.
  3. preachr 👍 1 Answered C
    To collect and analyze the failed events of an AWS Lambda function invoked asynchronously, the developer can leverage Lambda's built-in Dead Letter Queue (DLQ) feature with minimal development effort.
  4. rdiaz 👍 3 Answered C
    A dlq in SQS

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All DVA-C02 Questions

Access 100 questions with complete answers and detailed explanations.

View Full DVA-C02 Practice Test →

← Back to DVA-C02 Study Guide