AWS Certified SysOps Administrator – Associate — Question 271
A company has multiple Amazon EC2 instances that run a resource-intensive application in a development environment. A SysOps administrator is implementing a solution to stop these EC2 instances when they are not in use.
Which solution will meet this requirement?
Answer options
- A. Assess AWS CloudTrail logs to verify that there is no EC2 API activity. Invoke an AWS Lambda function to stop the EC2 instances.
- B. Create an Amazon CloudWatch alarm to stop the EC2 instances when the average CPU utilization is lower than 5% for a 30-minute period.
- C. Create an Amazon CloudWatch metric to stop the EC2 instances when the VolumeReadBytes metric is lower than 500 for a 30-minute period.
- D. Use AWS Config to invoke an AWS Lambda function to stop the EC2 instances based on resource configuration changes.
Correct answer: B
Explanation
Amazon CloudWatch alarms can be configured with EC2 actions to automatically stop an EC2 instance when a specific metric, such as CPU utilization, falls below a defined threshold indicating inactivity. AWS CloudTrail and AWS Config are not designed to monitor real-time resource utilization for idle states. Additionally, CloudWatch metrics alone cannot trigger actions without an associated alarm, making the CPU utilization alarm the most direct and reliable solution.