AWS Certified Developer – Associate (DVA-C02) — Question 255
A developer is building an application that invokes AWS Lambda functions asynchronously to process events. The developer notices that a Lambda function fails to process some events at random times. The developer needs to investigate the failed events and capture the events that the Lambda function fails to process.
Which solution will meet these requirements?
Answer options
- A. Add an Amazon EventBridge rule for the Lambda function. Configure the EventBridge rule to react to failed events and to store the events in an Amazon DynamoDB table.
- B. Configure the Lambda function with a dead-letter queue based in Amazon Kinesis. Update the Lambda function's execution role with the required permissions.
- C. Configure the Lambda function with an Amazon Simple Queue Service (Amazon SQS) dead-letter queue. Update the Lambda function's execution role with the required permissions.
- D. Configure the Lambda function with an Amazon Simple Queue Service (Amazon SQS) FIFO dead-letter queue. Update the Lambda function's execution role with the required permissions.
Correct answer: C
Explanation
The correct answer is C because configuring a dead-letter queue with Amazon SQS allows the developer to capture failed events for further analysis. Options A and B do not provide a suitable way to capture the failed events specifically for Lambda functions, and option D, while it also uses SQS, is not necessary since a standard dead-letter queue will suffice in this scenario.