What should a solutions architect do to meet these requirements?
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.
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.
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.
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.
Explanations:
While moving EC2 instances into an Auto Scaling group adds scalability, using Amazon EventBridge to target an ECS task does not directly address the need for resilient order processing and automatic recovery during a system outage. This approach lacks a message queuing mechanism that would help in ensuring that orders are not lost and can be reprocessed automatically.
Moving the EC2 instances into an Auto Scaling group behind an Application Load Balancer (ALB) improves availability but does not inherently solve the problem of processing orders during outages. The ALB handles traffic distribution but does not provide a mechanism for persisting failed order requests for later processing, which is necessary for resilience.
By moving EC2 instances into an Auto Scaling group and configuring the order system to send messages to an Amazon SQS queue, the solution provides a durable message storage that can handle failures. EC2 instances can consume messages from the SQS queue, ensuring that orders are processed even if the system experiences an outage. This decouples the order request submission from processing, enhancing resilience.
Using an SNS topic to trigger a Lambda function and then sending commands to EC2 instances via Systems Manager Run Command does not provide a robust solution for automatically processing orders in the case of a system failure. This approach introduces complexity and dependencies that may not guarantee that all orders are processed reliably, particularly in scenarios of high load or outages.