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
asked a year ago109 views
No Answers

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions