How do I debug a failed Cloudwatch Alarm action

0

I have the following Cloudwatch alarm set on my instances:

aws cloudwatch put-metric-alarm \
    --alarm-name stop-when-idle \
    --namespace AWS/EC2 \
    --metric-name CPUUtilization \
    --statistic Maximum \
    --period 300  \
    --evaluation-periods 3 \
    --threshold 10 \
    --comparison-operator LessThanThreshold \
    --unit Percent \
    --dimensions "Name=InstanceId,Value=$INSTANCE_ID" \
    --alarm-actions arn:aws:automate:$AWS_REGION:ec2:stop

However, it recently failed to run; it triggered successfully, and two seconds later attempted to run the stop action, but it says:

Failed to execute action arn:aws:automate:us-east-1:ec2:stop. Received error: ""

Looking at the full details, I see:

{
  "alarmName": "stop-when-idle",
  "alarmType": "MetricAlarm",
  "timestamp": "2023-03-16T07:01:07.187Z",
  "historyItemType": "Action",
  "historySummary": "Stop EC2 Instance 'i-REDACTED' failed",
  "historyData": {
    "actionState": "Failed",
    "stateUpdateTimestamp": 1678950065929,
    "notificationResource": "arn:aws:automate:us-east-1:ec2:stop",
    "publishedMessage": null,
    "error": null
  }
}

With no error listed. What can I do to figure out why this didn't work?

mikeage
已提問 1 年前檢視次數 114 次
沒有答案

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南