A company migrating on-premises workloads to AWS already uses several Amazon EC2 instances and Amazon RDS DB instances. The company wants to automatically start and stop the EC2 instances and DB instances outside business hours, minimizing cost and infrastructure maintenance. Which solution meets these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Create an AWS Lambda function that will start and stop the EC2 instances and DB instances. Configure Amazon EventBridge to invoke the Lambda function on a schedule..
Why this is the answer
The correct solution is to use an AWS Lambda function invoked by Amazon EventBridge. Lambda functions are serverless and cost-effective for executing code on a schedule. EventBridge (formerly CloudWatch Events) provides robust scheduling capabilities to trigger the Lambda function at specific times, which can then use the AWS SDK to start and stop EC2 instances and RDS DB instances. This approach minimizes operational overhead and cost, as Lambda is billed per execution and EventBridge for rules. Incorrect options: Scaling EC2 instances with elastic resize and scaling DB instances to zero are not mechanisms for stopping and starting resources; they relate to changing resource capacity. RDS does not have a "scale to zero" option for stopping. Exploring AWS Marketplace for partner solutions might work but introduces third-party dependencies and potential additional costs, which is not the most direct or AWS-native solution for this common task. Launching another EC2 instance to run cron jobs adds unnecessary infrastructure and maintenance overhead, defeating the purpose of minimizing infrastructure maintenance.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed