Soru

Zorluk: OrtaCloudWatch Metrics and Alarms

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?

  1. 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.Cevap
  2. B
    Enable 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.
  3. C
    Create 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.
  4. D
    Create 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.

Cevap

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.

Adım Adım Çözüm

1
Determine the metric type and publication frequency.
The metric is a custom metric published every 60 seconds (1 minute). This means the alarm's evaluation period should be configured for 1 minute to match the resolution of the data.
Aligning the evaluation period with the data publication frequency ensures timely and accurate alarm evaluations without unnecessary delay or missing data.
2
Identify the target action and valid integrations.
The target action is to execute an AWS Systems Manager Automation document. CloudWatch alarms cannot directly invoke Systems Manager Automation documents as an alarm action.
CloudWatch alarm actions are limited to EC2 actions, Auto Scaling, Systems Manager Incident Manager, and SNS notifications.
3
Determine the integration method to route the alarm trigger to Systems Manager.
Amazon EventBridge can capture CloudWatch alarm state change events and route them to targets. An EventBridge rule can target the SSM Automation document directly.
This provides a serverless, decoupled way to trigger automated remediation workflows on alarm state changes.

Anahtar Kavram

Integration of CloudWatch alarms with Systems Manager Automation using EventBridge for custom metric remediation.
Tahmini Süre:1m 30s
Bu soruyu puanla