AWS Certified Solutions Architect – Associate (SAA-C02) — Question 267
A company has two applications: a sender application that sends messages with payloads to be processed and a processing application intended to receive messages with payloads. The company wants to implement an AWS service to handle messages between the two applications. The sender application can send about 1,000 messages each hour. The messages may take up to 2 days to be processed. If the messages fail to process, they must be retained so that they do not impact the processing of any remaining messages.
Which solution meets these requirements and is the MOST operationally efficient?
Answer options
- A. Set up an Amazon EC2 instance running a Redis database. Configure both applications to use the instance. Store, process, and delete the messages, respectively.
- B. Use an Amazon Kinesis data stream to receive the messages from the sender application. Integrate the processing application with the Kinesis Client Library (KCL).
- C. Integrate the sender and processor applications with an Amazon Simple Queue Service (Amazon SQS) queue. Configure a dead-letter queue to collect the messages that failed to process.
- D. Subscribe the processing application to an Amazon Simple Notification Service (Amazon SNS) topic to receive notifications to process. Integrate the sender application to write to the SNS topic.
Correct answer: C
Explanation
Amazon SQS is a fully managed message queuing service that easily supports message retention for up to 14 days, perfectly accommodating the 2-day processing requirement. Using an SQS dead-letter queue (DLQ) ensures that failed messages are isolated without blocking the processing of other messages, providing the most operationally efficient solution. Other options like EC2 with Redis introduce unnecessary management overhead, while SNS and Kinesis are not suited for long-term asynchronous queuing and message isolation via DLQs in this scenario.