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
posta un anno fa114 visualizzazioni
Nessuna risposta

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande