Set up CloudWatch Alarms and SNS Topics in AWS

Set up CloudWatch Alarms and SNS Topics in AWS

Day 46 of 90daysofdevops

What is Amazon CloudWatch?

Amazon CloudWatch monitors your Amazon Web Services (AWS) resources and the applications you run on AWS in real-time. You can use CloudWatch to collect and track metrics, which are variables you can measure for your resources and applications.

Read more about Cloudwatch from the official documentation here

What is Amazon SNS?

Amazon Simple Notification Service is a notification service provided as part of Amazon Web Services since 2010. It provides a low-cost infrastructure for the mass delivery of messages, predominantly to mobile users.

Read more about it here

Task :

  • Create a CloudWatch alarm that monitors your billing and sends an email to you when it reaches $2.

  • Delete the billing Alarm that you created now.


Enable the monitoring of estimated charges

  • Open the AWS Billing Console

  • In the navigation pane, choose Billing Preferences.

  • Choose to Receive Billing Alerts & Save preferences.

Creating a billing alarm

  • Open the CloudWatch console. In the navigation pane, choose Alarms, and then choose All alarms.

    Choose to Create Alarm.

  • Choose Select metric.

  • In Browse, choose Billing, and then choose Total Estimated Charge.

  • Select the box for the EstimatedCharges metric, and then choose Select metric.

    • Make a tick on USD

  • For Statistic, choose Maximum & for Period, choose 6 hours.

  • For the Threshold type, choose Static.

    For Whenever EstimatedCharges is, choose Greater.

    define a threshold value that triggers your alarm. here threshold value is 2$.

Creation of SNS Topic

  • Under Notification, specify an Amazon SNS topic to be notified when you get CloudWatch Alarm.

    • You can select an existing Amazon SNS topic or create a new Amazon SNS topic by selecting 'Create new topic'.

  • One topic is created, it will auto-select

  • If you want your alarm to send multiple notifications for the same alarm state or for different alarm states, choose Add Notification.

    choose Next.

  • Under Name and Description, enter a name for your alarm.

  • Under Preview and Create, make sure that your configuration is correct, and then choose Create alarm.

  • We have to confirm for creation SNS

    • Confirm the Subscription.

  • Once the Subscription is confirmed, a billing alarm is created.

  • Now we can verify the configuration for Alarm we had created.

Delete the billing Alarm that you created now.


Thank You,

I want to express my deepest gratitude to each and every one of you who has taken the time to read, engage, and support my journey.

Feel free to reach out to me if any corrections or add-ons are required on blogs. Your feedback is always welcome & appreciated.

~ Abhisek Moharana 🙂