< Back

Integration: Amazon CloudWatch Alarm

You need to set up an Amazon SNS topic for this integration!

Amazon CloudWatch provides metrics that you can observe with alarms. Once a metric reaches a threshold, the alarm can trigger an action.

I will show you how you can monitor your AWS bill. If your bill goes above a certain threshold, an event is sent to marbot that triggers an alert. You can not only monitor your AWS bill in CloudWatch. CloudWatch provides much more!

Monitoring your AWS bill with a CloudWatch Alarm

  1. Visit https://console.aws.amazon.com/cloudwatch/home?region=us-east-1
  2. Ensure that you are in the N. Virgina region
  3. Click on the Alarm link on the left
  4. Click on the Create Alarm button
  5. Click on the Total Estimated Charge metric under Billing Metrics
  6. Select the only line

You should now see the following screen:

Billing Metric

  1. Click on the Next button on the bottom
  2. Set a Name and a Description for the alarm
  3. Set the threshold to $0 to ensure that the alarm is triggered (for test purposes only, you can change this later)
  4. In the actions section at the bottom, set Send notification to the SNS topic you created, e.g. marbot.
  5. Save by clicking the Create alarm button.

Billing Metric

Sample Alert

Within a minute you should receive an alert in Slack:

Billing Alert via CloudWatch Alarm

Auto-close

A CloudWatch Alarm can be in one of three states:

  • OK
  • ALARM
  • INSUFFICIENT_DATA

If a CloudWatch Alarm is in the state ALARM or INSUFFICIENT_DATA I will create a new alert for you. If a CloudWatch Alarm is in the state OK I will search for a related alert and close it for you. An auto-closed alert will look like this:

Auto-closed alert

Namespace
AWS/AmazonMQ
AWS/ApiGateway
AWS/AppSync
AWS/AutoScaling
AWS/Billing
AWS/Chatbot
AWS/CloudFront
AWS/CodeBuild
AWS/DX
AWS/DynamoDB
AWS/EBS
AWS/EC2
AWS/ECS
AWS/EFS
AWS/ElastiCache
AWS/ElasticBeanstalk
AWS/ElasticMapReduce
AWS/ELB
AWS/ES
AWS/Events
AWS/Firehose
AWS/FSx
AWS/IoT
AWS/Kinesis
AWS/KMS
AWS/Lambda
AWS/Logs
AWS/NATGateway
AWS/OpsWorks
AWS/RDS
AWS/Redshift
AWS/S3
AWS/SES
AWS/SNS
AWS/SQS
AWS/States
AWS/TrustedAdvisor
AWS/VPN
AWS/WorkSpaces
CloudWatchSynthetics

More help needed? Or want to share feedback?

If you experience any issues, let us know.

E-mail icon
E-Mail
marbot teaser

Chatbot for AWS Monitoring

Configure monitoring for Amazon Web Services: CloudWatch, EC2, RDS, EB, Lambda, and more. Receive and manage alerts via Slack. Solve incidents as a team.

Slack
Add to Slack
Microsoft Teams
Add to Teams