A SysOps Administrator is designing an automated remediation workflow for a web application running on an Amazon EC2 instance. The administrator needs to configure an Amazon CloudWatch alarm to monitor the EC2 instance's CPU utilization (). The alarm must trigger an automated response if the CPU utilization exceeds for three consecutive -minute periods. The automated response must execute an AWS Systems Manager (SSM) Automation runbook. Which actions should the administrator take to meet these requirements? (Select TWO.)
- Enable detailed monitoring on the EC2 instance to ensure CPU metric data is sent to CloudWatch at -minute intervals.Answer
- Create an Amazon EventBridge rule that detects when the CloudWatch alarm transitions to the ALARM state and targets the Systems Manager Automation runbook.Answer
- CKeep standard monitoring enabled on the EC2 instance and set the alarm's evaluation period to minute, relying on CloudWatch to interpolate the -minute values.
- DConfigure the CloudWatch alarm's notification action to directly trigger the Systems Manager Automation runbook using an IAM execution role.
- EConfigure a scaling cooldown period within the Systems Manager Automation runbook configuration to prevent it from executing again if the metric remains high.
Answer
Enable detailed monitoring on the EC2 instance to ensure CPU metric data is sent to CloudWatch at 1-minute intervals, and create an Amazon EventBridge rule that detects when the CloudWatch alarm transitions to the ALARM state and targets the Systems Manager Automation runbook.
To evaluate a CloudWatch alarm at -minute intervals for default EC2 metrics (like CPU utilization), detailed monitoring must be enabled on the EC2 instance. Without it, data is only published every minutes. Additionally, CloudWatch alarms do not support direct invocation of Systems Manager Automation runbooks as an alarm action. An Amazon EventBridge rule must be created to detect the alarm state change event and target the runbook.
Step-by-Step Solution
Key Concept
Configuring CloudWatch alarms with detailed monitoring and routing alerts to AWS Systems Manager Automation via Amazon EventBridge.