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?
Community Votes
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)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
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 →