A SysOps Administrator is setting up monitoring and automated remediation for a standalone Amazon EC2 instance. The administrator needs to configure a CloudWatch alarm to detect CPU utilization spikes and automatically reboot the instance if CPU utilization exceeds 90% for three consecutive 1-minute periods. Which TWO of the following configuration steps are required to achieve this goal?
- Enable detailed monitoring on the EC2 instance to allow CloudWatch to receive metric data at 1-minute intervals.Answer
- Configure the CloudWatch alarm to trigger an EC2 Action that reboots the instance when the alarm state is reached.Answer
- CKeep standard monitoring enabled on the EC2 instance since default EC2 metrics are sent to CloudWatch every 1 minute.
- DCreate an Amazon EventBridge rule that directly monitors the EC2 instance's OS logs to trigger a reboot.
- EConfigure an Auto Scaling lifecycle hook with a 300-second cooldown period to reboot the instance.
Answer
To achieve the goal, enable detailed monitoring on the EC2 instance and configure the CloudWatch alarm to trigger an EC2 Action that reboots the instance.
Detailed monitoring must be enabled to monitor EC2 metrics at 1-minute intervals. The CloudWatch alarm can then be configured to execute an EC2 Action to reboot the instance automatically when the alarm is triggered.
Step-by-Step Solution
Key Concept
CloudWatch Detailed Monitoring and Alarm Actions