AWS Certified Solutions Architect – Associate (SAA-C02) — Question 762
A company's order system sends requests from clients to Amazon EC2 instances. The EC2 instances process the orders and then store the orders in a database on Amazon RDS. Users report that they must reprocess orders when the system fails. The company wants a resilient solution that can process orders automatically if a system outage occurs.
What should a solutions architect do to meet these requirements?
Answer options
- A. Move the EC2 instances into an Auto Scaling group. Create an Amazon EventBridge (Amazon CloudWatch Events) rule to target an Amazon Elastic Container Service (Amazon ECS) task.
- B. Move the EC2 instances into an Auto Scaling group behind an Application Load Balancer (ALB). Update the order system to send messages to the ALB endpoint.
- C. Move the EC2 instances into an Auto Scaling group. Configure the order system to send messages to an Amazon Simple Queue Service (Amazon SQS) queue. Configure the EC2 instances to consume messages from the queue.
- D. Create an Amazon Simple Notification Service (Amazon SNS) topic. Create an AWS Lambda function, and subscribe the function to the SNS topic. Configure the order system to send messages to the SNS topic. Send a command to the EC2 instances to process the messages by using AWS Systems Manager Run Command.
Correct answer: C
Explanation
Using an Amazon Simple Queue Service (Amazon SQS) queue to decouple the order system from the processing EC2 instances ensures that messages are safely stored even if the instances fail. Combined with an Auto Scaling group, the system can automatically scale to handle load and recover from failures without losing order data. Options A, B, and D do not offer a decoupled, durable queuing mechanism to store messages during a processing outage, which would still result in lost orders or manual reprocessing.