
Answer-first summary for fast verification
Answer: Use an Amazon SQS dead-letter queue to capture failed events and ensure the Lambda function has the appropriate permissions.
The correct answer is C: Use an Amazon SQS dead-letter queue to capture failed events and ensure the Lambda function has the appropriate permissions. A dead-letter queue (DLQ) is an appropriate way to handle Lambda function failures since it can capture the failed events for later inspection and debugging. Configuring the DLQ with Amazon SQS is simpler and more appropriate compared to the other options. Option B (using Kinesis) and D (using SQS FIFO) add unnecessary complexity and are not ideal for this use case. Option A involves additional costs and complexity by using DynamoDB, which is not required.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A developer encounters random failures in an application that uses AWS Lambda for asynchronous event processing. How can the developer capture and investigate these failed events?
A
Implement an Amazon EventBridge rule to capture and store failed events in a DynamoDB table.
B
Set up a dead-letter queue in Amazon Kinesis and grant the Lambda function the necessary permissions.
C
Use an Amazon SQS dead-letter queue to capture failed events and ensure the Lambda function has the appropriate permissions.
D
Employ an Amazon SQS FIFO dead-letter queue for capturing failed events and update the Lambda function's execution role with required permissions.