A SysOps Administrator is designing an automated remediation workflow to reboot an Amazon EC2 instance if a custom application health metric falls below a threshold. The custom metric is published to Amazon CloudWatch every 60 seconds. The reboot must be performed by an AWS Systems Manager (SSM) Automation document. Which configuration will meet these requirements with the least operational overhead?
- Create a CloudWatch alarm to monitor the custom metric with an evaluation period of 1 minute. Configure an Amazon EventBridge rule that detects the CloudWatch alarm state change to ALARM and targets the Systems Manager Automation document.Answer
- BEnable detailed monitoring on the EC2 instance to ensure the custom metric is evaluated at 1-minute intervals. Configure the CloudWatch alarm action to directly execute the Systems Manager Automation document.
- CCreate a CloudWatch alarm to monitor the custom metric with an evaluation period of 5 minutes. Configure the CloudWatch alarm action to send the state change event to an Amazon Kinesis Data Firehose stream to trigger the Systems Manager Automation document.
- DCreate a CloudWatch alarm to monitor the custom metric with an evaluation period of 5 minutes. Configure the CloudWatch alarm to send a message to an Amazon Simple Queue Service (Amazon SQS) queue, and configure the SQS queue to directly invoke the Systems Manager Automation document.
Answer
Create a CloudWatch alarm to monitor the custom metric with an evaluation period of 1 minute. Configure an Amazon EventBridge rule that detects the CloudWatch alarm state change to ALARM and targets the Systems Manager Automation document.
The correct configuration uses a CloudWatch alarm with a 1-minute evaluation period to match the custom metric's 60-second publication rate. Because CloudWatch alarms cannot directly invoke Systems Manager Automation, an Amazon EventBridge rule is configured to detect the alarm's state change to ALARM, which then targets the Systems Manager Automation document to perform the reboot.
Step-by-Step Solution
Key Concept
Integration of CloudWatch alarms with Systems Manager Automation using EventBridge for custom metric remediation.
Estimated Time:1m 30s