
Answer-first summary for fast verification
Answer: Transition the script to an AWS Lambda function with a suitable runtime.
The correct answer is C. Migrating the script from the Amazon EC2 instance to an AWS Lambda function with the appropriate runtime is the best solution for reducing operational costs while maintaining the ability to handle an increasing number of messages in the queue. AWS Lambda automatically scales the execution of your function in response to the number of incoming messages, ensuring efficient processing without the need to manage or scale EC2 instances manually. This eliminates the overhead cost of running an always-on EC2 instance and provides a more cost-effective, scalable, and manageable solution.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
A company utilizes an Amazon EC2 instance for running a script that polls and processes messages from an Amazon SQS queue. To reduce costs and handle an increasing message volume, what should the architect recommend?
A
Upgrade the EC2 instance for faster message processing.
B
Implement Amazon EventBridge to deactivate the EC2 instance during periods of low utilization.
C
Transition the script to an AWS Lambda function with a suitable runtime.
D
Employ AWS Systems Manager Run Command for on-demand script execution.
No comments yet.