A company uses an Amazon EC2 instance to run a script to poll for and process messages in an Amazon Simple Queue Service (Amazon SQS) queue. The company wants to reduce operational costs while maintaining its ability to process a growing number of messages that are added to the queue. What should a solutions architect recommend to meet these requirements?

Published
  1. Increase the size of the EC2 instance to process messages faster.
  2. Use Amazon EventBridge to turn off the EC2 instance when the instance is underutilized.
  3. Migrate the script on the EC2 instance to an AWS Lambda function with the appropriate runtime.
  4. Use AWS Systems Manager Run Command to run the script on demand.

Comments — 0