
Ultimate access to all questions.
Deep dive into the quiz with AI chat providers.
We prepare a focused prompt with your quiz and certificate details so each AI can offer a more tailored, in-depth explanation.
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?
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.
Explanation:
Why Option C is correct:
SQS provides message durability and decoupling: Amazon SQS is a fully managed message queuing service that stores messages until they are processed. This ensures that orders are not lost if EC2 instances fail.
Auto Scaling ensures availability: Moving EC2 instances into an Auto Scaling group ensures that if an instance fails, new instances are automatically launched to replace them.
Resilient processing: When EC2 instances consume messages from SQS, they can process orders asynchronously. If an instance fails while processing a message, the message visibility timeout will expire, and the message will become available again for another instance to process.
Automatic failover: The combination of SQS and Auto Scaling provides automatic recovery from system outages without manual intervention.
Why other options are incorrect:
Option A: EventBridge with ECS doesn't address the core problem of message durability. If EC2 instances fail while processing orders, the orders could be lost.
Option B: Using an ALB helps with load distribution but doesn't provide message persistence. If an EC2 instance fails while processing an order, the order could be lost.
Option D: This solution adds unnecessary complexity with SNS, Lambda, and Systems Manager. While it might work, it's not the most efficient or resilient solution. The Lambda function would need to trigger Systems Manager commands, which adds multiple points of failure and doesn't provide the same level of message durability as SQS.
Key AWS Services for Resilience:
This solution ensures that orders are never lost and can be automatically reprocessed if system failures occur, meeting the requirement for a resilient order processing system.