AWS Certified DevOps Engineer – Professional — Question 43
A company develops and maintains a web application using Amazon EC2 instances and an Amazon RDS for SQL Server DB instance in a single Availability
Zone. The resources need to run only when new deployments are being tested using AWS CodePipeline. Testing occurs one or more times a week and each test takes 2-3 hours to run. A DevOps engineer wants a solution that does not change the architecture components.
Which solution will meet these requirements in the MOST cost-effective manner?
Answer options
- A. Convert the RDS database to an Amazon Aurora Serverless database. Use an AWS Lambda function to start and stop the EC2 instances before and after tests.
- B. Put the EC2 instances into an Auto Scaling group. Schedule scaling to run at the start of the deployment tests.
- C. Replace the EC2 instances with EC2 Spot Instances and the RDS database with an RDS Reserved Instance.
- D. Subscribe Amazon CloudWatch Events to CodePipeline to trigger AWS Systems Manager Automation documents that start and stop all EC2 and RDS instances before and after deployment tests.
Correct answer: D
Explanation
The correct answer is D because it automates the process of starting and stopping the instances only when needed, aligning perfectly with the testing schedule without incurring unnecessary costs. Option A introduces unnecessary complexity by switching to an Aurora Serverless database, while B and C do not adequately address the requirement of starting and stopping instances based on the testing schedule.