Day-44: Set up Cloud Watch alarms and SNS topic in AWS

Rahul sharmaRahul sharma
3 min read

What is Amazon Cloud Watch?

Amazon CloudWatch is a monitoring and observability service provided by Amazon Web Services (AWS). It allows users to collect and track metrics, monitor log files, set alarms, and automatically react to changes in AWS resources. CloudWatch helps users gain insights into the performance and health of their applications, infrastructure, and services running on AWS.

What is Amazon SNS?

Amazon Simple Notification Service (Amazon SNS) is a fully managed messaging service provided by Amazon Web Services (AWS). It enables you to send notifications to a variety of endpoints such as email, SMS, HTTP, and more. SNS supports both pub/sub (publish/subscribe) and push notification models, making it easy to send messages or notifications to a large number of subscribers or individual recipients.

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

To create a CloudWatch alarm that monitors your billing and sends an email when it reaches $2, you would follow these steps:

  1. Sign in to the AWS Management Console and open the CloudWatch console.

  2. Navigate to the Billing dashboard:

    • In the navigation pane, choose "Billing" to open the Billing and Cost Management dashboard.

    • From the dashboard menu, choose "Preferences".

    • Scroll down to the "Billing preferences" section and enable "Receive Billing Alerts".

  3. Create a billing alarm:

    • In the CloudWatch console, choose "Alarms" from the left navigation pane, and then choose "Create Alarm".

    • Under "Select metric", choose "Billing" from the list of metrics.

    • Choose the "Total Estimated Charge" metric and select the appropriate region.

    • Specify the conditions for the alarm. For example, set the threshold to ">= $2".

    • Choose "Next".

  4. Configure actions:

    • Under "Whenever this alarm state is:", select "In alarm".

    • Choose "Add notification" and select "New list".

    • Choose the "Create topic" button to create an SNS topic.

    • Enter a name for the topic and an email address to which you want to receive notifications.

    • Choose "Create topic" and then "Subscribe".

  5. Review and create the alarm:

    • Review the alarm configuration.

    • Enter a name and description for the alarm.

    • Choose "Create Alarm".

Once the alarm is created, you will receive an email notification whenever your billing exceeds $2. Make sure to monitor your billing regularly to avoid unexpected charges.

Delete your billing Alarm that you created now.

As an AI, I don't have direct access to your AWS account or the ability to execute actions within it. However, you can follow these steps to delete the billing alarm you created:

  1. Sign in to the AWS Management Console and open the CloudWatch console.

  2. Navigate to the Alarms dashboard by selecting "Alarms" from the left navigation pane.

  3. Locate the billing alarm you want to delete from the list of alarms.

  4. Select the checkbox next to the alarm to highlight it.

  5. Click on the "Actions" dropdown menu above the alarms list.

  6. From the dropdown menu, select "Delete" and confirm the deletion when prompted.

Following these steps will remove the billing alarm from your CloudWatch alarms list.

0
Subscribe to my newsletter

Read articles from Rahul sharma directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Rahul sharma
Rahul sharma