How to Route Asynchronous Lambda Invocation Errors?
Short answer
A Configure a Lambda function destination with a failure condition. Specify Lambda function as the destination type. Specify the error-handling Lambda function's Amazon Resource Name (ARN) as the resource.
Question
Key Takeaways
Tests knowledge of Lambda async routing controls, with the common trap confusing outbound destinations with inbound triggers.
This scenario evaluates configuring Lambda destinations for asynchronous invocation error routing. Community consensus confirms destinations are the native, code-free mechanism to automatically invoke a secondary function upon failure.
Common mistake: Option C is frequently selected incorrectly because candidates misinterpret triggers as post-execution handlers, whereas triggers actually initiate invocations from external event sources.
Expert Analysis
Why the Answer Is Correct
Lambda destinations natively support routing successful or failed asynchronous invocations to targets like SQS, SNS, EventBridge, or another Lambda function. By configuring a destination with a failure condition and specifying the ARN of the error-handling function, AWS automatically invokes it when the primary function throws an error or times out. This approach requires zero code changes and aligns perfectly with serverless best practices for decoupled error handling.
Why the Other Options Are Wrong
Option B misuses X-Ray, which is strictly for distributed tracing and debugging, not for automated error routing. Option C incorrectly suggests a failure trigger, but Lambda triggers are inbound event sources that start execution, not outbound post-execution handlers. Option D relies on CloudWatch alarms, which monitor aggregate metrics over time rather than individual invocation failures and cannot reliably pass specific stack traces to downstream functions.
Community Comment Notes
Contributors consistently validate option A by referencing AWS documentation on asynchronous invocation destinations. Comment [1] highlights that destinations enable automatic error handling without modifying application code. Comment [2] correctly clarifies that Lambda lacks direct failure-based triggers, reinforcing why option C is invalid. Comment [3] provides the official documentation link for quick verification during exam prep.
Official Reference
https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations
This link opens the official vendor documentation in a new tab.
Exam Strategy
Focus on mastering Lambda's native async features, particularly destinations for both success and failure routing. Always differentiate between inbound triggers (event sources) and outbound destinations (post-execution targets) when designing serverless architectures.
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 5 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 5
-
SerialiDr 👍 3 Answered ALambda destinations allow you to configure what happens to Lambda function invocation records when an invocation is successful or, in this case, when it fails. By setting a destination for failed invocations, you can specify another Lambda function to handle errors. This setup enables automatic error handling without requiring changes to the application code or the use of additional services for monitoring and triggering error-handling mechanisms. The error-handling Lambda function can then log details, send notifications, or take corrective actions as needed.
-
CrescentShared 👍 2 Answered Ais not a valid approach because Lambda does not have a direct configuration for triggers based on failure conditions in the way described. The concept of a trigger is generally used for starting an invocation, not handling failures.
-
KarBiswa 👍 1 Answered Ahttps://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html#invocation-async-destinations
-
monishvster 👍 1 Answered AShould be A since Trigger is before execution
-
65703c1 👍 2 Answered AA is the correct answer.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All DVA-C02 Questions
Access 100 questions with complete answers and detailed explanations.
View Full DVA-C02 Practice Test →