What should the solutions architect do to meet these requirements?
Create an Amazon Simple Queue Service (Amazon SQS) queue. Configure the queue as the dead-letter queue for the API.
Create two Amazon Simple Queue Service (Amazon SQS) queues: a primary queue and a secondary queue. Configure the secondary queue as the dead-letter queue for the primary queue. Update the API to use a new integration to the primary queue. Configure the Lambda function as the invocation target for the primary queue.
Create two Amazon EventBridge event buses: a primary event bus and a secondary event bus. Update the API to use a new integration to the primary event bus. Configure an EventBridge rule to react to all events on the primary event bus. Specify the Lambda function as the target of the rule. Configure the secondary event bus as the failure destination for the Lambda function.
Create a custom Amazon EventBridge event bus. Configure the event bus as the failure destination for the Lambda function.
Explanations:
Using a single SQS queue as the dead-letter queue for the API won’t ensure that no data is lost or guarantee that data will be processed later if failures occur. The integration with a Lambda function doesn’t address persistent retry logic or failure handling for the third-party service.
This option provides resiliency by using two SQS queues: a primary queue for processing the incoming data and a secondary queue as a dead-letter queue. If data can’t be processed, it will be sent to the secondary queue, ensuring no data is lost, and it can be retried later.
Using two EventBridge event buses with one as a failure destination for Lambda is not an optimal solution. While EventBridge is useful for event-driven architectures, this setup would overcomplicate the flow and does not address the need for immediate retry or message queuing.
A custom EventBridge event bus as the failure destination for the Lambda function does not address the need to buffer failed data and retry it later. EventBridge is more suited for event-driven actions, and it lacks the queuing and retry mechanism necessary for processing failed data.