AWS Certified Developer – Associate (DVA-C02) — Question 395
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?
Answer options
- A. Add logging statements for all events in the Lambda function. Filter AWS CloudTrail logs for errors.
- B. Configure the Lambda function to start an AWS Step Functions workflow with retries for failed events.
- C. Add a dead-letter queue to send messages to an Amazon Simple Queue Service (Amazon SQS) standard queue.
- D. Add a dead-letter queue to send messages to an Amazon Simple Notification Service (Amazon SNS) FIFO topic.
Correct answer: C
Explanation
Configuring an Amazon SQS standard queue as a dead-letter queue (DLQ) is a built-in feature of AWS Lambda that captures failed asynchronous event payloads with minimal administrative effort. Option D is incorrect because Amazon SNS FIFO topics are not supported as targets for Lambda DLQs. Options A and B require significantly more development and refactoring effort compared to setting up a standard SQS DLQ.