Set up CloudWatch alarms and SNS topic in AWS

This is Day 46 of #90daysofdevops challenge

ยท

2 min read

Set up CloudWatch alarms and SNS topic in AWS

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.

In summary, CloudWatch provides visibility into your resources, applications and services running on AWS. It helps you track operational health, resource utilization and performance metrics. The data collected by CloudWatch can then be used to set alarms, auto-scale resources and trigger actions.

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.

Task: Create and Delete a Billing Alarm in AWS CloudWatch

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

  • Sign in to your AWS Management Console.

  • Now, choose Billing Dashboard from the navigation bar.

  • Choose "Billing preferences" from the navigation bar.

  • Now Click on edit "Alert preferences" and update it.

Create a Billing Alarm:

  • Go to the AWS Management Console and navigate to the CloudWatch service.

  • In the navigation pane, choose "Alarms," and then click the "Create Alarm" button.

  • In the "Create Alarm Wizard," under the "Select metric" section, scroll down and choose "Billing."

  • Select Total Estimated Charge then click on select metric.

  • Under "Conditions," set the threshold to "$2" (or your desired amount).

  • Configure the actions to send an email notification when the alarm state is triggered. You can either create a new SNS topic or choose an existing one and set up email notifications in Amazon SNS.

  • You'll receive an email and then we can confirm the subscription to enable the Cloud Watch service.

  • Click on "Confirm subscription"

  • Provide a name for the alarm, and add a description if needed.

  • Click the "Create Alarm" button to create the billing alarm.

Delete the Billing Alarm:

  1. In the "Actions" dropdown menu, choose "Delete."

  2. Confirm the deletion when prompted.

The billing alarm will now be deleted from your AWS account.

"Thank you for enjoying my DevOps blog! Your positive response fuels my passion to dive deeper into technology and innovation.

Stay tuned for more captivating DevOps articles, where we'll explore this dynamic field together. Follow me on Hashnode and connect on LinkedIn (https://www.linkedin.com/in/som-shanker-pandey/) for the latest updates and discussions.

Did you find this article valuable?

Support Som Pandey's blog by becoming a sponsor. Any amount is appreciated!

ย