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
gefragt vor einem Jahr114 Aufrufe
Keine Antworten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen