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:
Moving EC2 instances into an Auto Scaling group and using Amazon EventBridge to target an ECS task does not address the requirement for resilience in processing orders after a system outage. EventBridge is more suitable for event-driven architectures but does not inherently provide message durability or order processing guarantees.
While moving EC2 instances into an Auto Scaling group behind an Application Load Balancer (ALB) improves availability and scalability, it does not provide a mechanism to handle message durability during outages. The order system would still risk losing orders if the EC2 instances are not available to process them.
Moving EC2 instances into an Auto Scaling group and using Amazon SQS allows for decoupling the order processing system. Orders can be sent to the SQS queue, ensuring that messages are stored reliably until the EC2 instances are available to process them. This setup provides resilience by allowing orders to be retried automatically in the event of an outage.
Creating an SNS topic and a Lambda function does allow for event-driven processing, but it relies on the EC2 instances being able to process messages via AWS Systems Manager Run Command, which adds complexity and does not ensure durability for order messages. If the EC2 instances are unavailable, orders may still be lost.