Handling Failed Lambda Invocations with Minimal Overhead?

A developer is building an application on AWS. The application includes an AWS Lambda function that processes messages from an Amazon Simple Queue Service (Amazon SQS) queue. The Lambda function sometimes fails or times out. The developer needs to figure out why the Lambda function fails to process some messages. Which solution will meet these requirements with the LEAST operational overhead?

  1. Increase the maximum timeout of the Lambda function to 15 minutes. Check the AWS CloudTrail event history for error details.
  2. Increase the visibility timeout of the SQS queue. Check logs in Amazon CloudWatch Logs for error details.
  3. Create a dead-letter queue. Configure the Lambda function to send the failed messages to the dead-letter queue. Source Reference Answer
  4. Create an Amazon DynamoDB table. Update the Lambda function to send the failed messages to the DynamoDB table.

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.

Community Insight

The exam tests knowledge of native AWS error-handling mechanisms, specifically highlighting that DLQs automatically capture failed invocations for later inspection, bypassing the need for manual logging or custom failure routing logic.

This question evaluates best practices for managing failed AWS Lambda executions triggered by Amazon SQS using native Dead-Letter Queues (DLQs). Community consensus confirms that configuring a DLQ provides the simplest, lowest-overhead method to isolate and inspect problematic messages without custom code or complex monitoring setups.

Candidates frequently select option B because CloudWatch Logs are familiar, but this approach requires additional configuration and does not preserve the original message payload for direct debugging, whereas DLQs natively handle failed data with zero extra operational overhead.

Community Discussion (4 comments)

tgv 👍 7 Selected: C
Always DLQ for checking failed processed messaged in Lambda.
65703c1 👍 1 Selected: C
C is the correct answer.
be1dca8 👍 3
B, the question is asking how the developer can figure out the issue. it is not asking about where to put the failed messages to.
Abdullah22 👍 3 Selected: C
https://aws.amazon.com/blogs/compute/implementing-aws-lambda-error-handling-patterns/

Comments & Corrections

No comments 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.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Option C is correct because AWS Lambda natively supports integration with SQS dead-letter queues for invocation failures. When a Lambda function repeatedly fails to process an SQS message, AWS automatically routes the failed payload to the designated DLQ. This approach requires minimal configuration through the AWS console or IaC, eliminating the need for custom error-handling code or additional storage services. Once in the DLQ, developers can easily inspect, debug, or manually reprocess the exact failed messages.

Why the Other Options Are Wrong

Option A incorrectly suggests increasing the timeout and relying on CloudTrail, which primarily tracks API calls rather than runtime execution errors or payload details. Option B focuses on adjusting visibility timeouts and CloudWatch Logs; while logs capture exceptions, they do not preserve the original SQS message body for direct debugging without custom extraction logic. Option D proposes using DynamoDB, which introduces unnecessary database management overhead compared to the fully managed, purpose-built DLQ feature. Both B and D require additional development effort, directly violating the least operational overhead requirement.

Community Comment Notes

The community strongly agrees with option C, emphasizing that DLQs are the standard AWS pattern for isolating failed Lambda-SQS interactions. One contributor noted that DLQs are ideal for post-mortem analysis of failed processed messages, aligning with official AWS architecture guidelines. Another comment referenced the AWS Compute Blog on Lambda error-handling patterns, confirming that DLQs reduce operational burden by automating failure routing. These insights reinforce that native service integrations consistently outperform custom workarounds in certification scenarios.

Official Reference

Exam Strategy

Always prioritize AWS-managed, native features over custom solutions when the question emphasizes least operational overhead. For serverless error handling, immediately consider built-in mechanisms like Lambda Destinations, DLQs, or CloudWatch Alarms before evaluating custom logging or external storage options.

Related Analysis

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