Which solution will meet these requirements?
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.
Configure the Lambda function with a dead-letter queue based in Amazon Kinesis. Update the Lambda function’s execution role with the required permissions.
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.
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.
Explanations:
While using Amazon EventBridge can help capture failed events, it does not provide a direct dead-letter mechanism for AWS Lambda. EventBridge can route events based on rules, but it is not designed for storing failed event data specifically related to Lambda function failures.
Kinesis is not designed to be used as a dead-letter queue for Lambda functions. Lambda functions can use Kinesis for event sources, but for capturing failed invocations, a proper dead-letter queue option is required, which Kinesis does not provide.
Configuring an Amazon SQS dead-letter queue allows failed Lambda invocations to be captured for later analysis. This setup lets the developer investigate the specific events that caused failures and take necessary actions. Updating the execution role with the required permissions ensures that the Lambda function can send messages to the SQS dead-letter queue.
While SQS FIFO dead-letter queues can be used, they are not necessary for all applications and do not provide any additional benefits over standard SQS dead-letter queues for simply capturing failed events. The additional complexity of FIFO queues is unwarranted if strict ordering is not required.