# Day 46- 90DayOfDevOps

Hey Learners! Welcome back. It's been so many days since we have been using AWS services what if any service is charging your bill continuously and you don't know unless and until the bill gets generated, To watch such kinds of activities we use an AWS service called CloudWatch and inform to the responsible person using the SNS service. Let's deep dig into it...

### What is Amazon CloudWatch?

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

### What is Amazon SNS?

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

### Task:-

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

1. Sign in to the AWS console and search for *CloudWatch* service. Select *Alarms* from the left navigation pane and click *Create alarm*.
    
    Note:- In some regions, the Billing Alarm option is not available. For this challenge, I have selected the *us-east-1(N.Virginia)* region
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695117105832/701b0915-e9fa-4193-933e-fddcc98b57c2.png align="center")
    
2. Define the Threshold type as Static and mention the estimated charges accordingly.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695117252457/a682f509-7777-4697-8e6a-615d08ba961a.png align="center")
    
3. Select *In alarm* as an *Alarm state trigger* and *create a new topic* for SNS. Click *Create topic.*
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695117485142/3befcf3c-018f-45e5-ad36-46c97f56918b.png align="center")
    
4. You can view details of your created SNS topic by clicking *View in SNS console.*
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695117642513/5f8ed272-63de-4c26-85cd-5f7f504cda7f.png align="center")
    
    As you see Status is showing Pending confirmation. Check the entered mail ID and confirm the subscription.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695117728637/9f162674-3a2a-45de-beac-bef096071108.png align="center")
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695117753334/abcfc2cd-abb2-473d-96db-3e8f14970058.png align="center")
    
5. Now check the SNS console. You will see the Status as *Confirmed*.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695117840180/23d89c05-1dc7-4f8c-aff1-a483a3cf8700.png align="center")
    
6. Now back to Alarm. Click *Next* and enter the name and descriptionfor Alarm. Click *Next*. Review the details entered and click *Create alarm*.
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695117971871/31f7e4f6-0038-4b2a-8fcf-b6cdd3e31ba3.png align="center")
    
7. Wait for 2-3 min and check *All alarms*
    
    ![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695118217885/87a5d879-0034-4bb7-9abf-4d41d6ceed3f.png align="center")
    

This will trigger the notification after touching the Threshold value($2).

*If you want to demonstrate this by using some costly services and after having a $2 bill you will get a notification by mail on the mentioned mailID. (OWN RISK)*

**Delete the billing Alarm that you created now**

To delete the alarm you created Go to *All alarms* and select the alarm you want to delete. Click on *Actions* and choose *Delete.*

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695118752355/fa6221cc-20f3-4341-814e-376ff189ef6a.png align="center")

Also, delete the SNS topic created. Search for SNS service and Select *Topic* from the left navigation pane. Select the topic you want to delete and click *Delete*. type *delete me* when asked for confirmation and click *Delete.*

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1695118900793/f079755c-44f4-4fd6-a8db-dab2bc64ba5a.png align="center")

Thank you so much for taking the time to read till the end! Hope you found this blog informative.

Feel free to explore more of my content, and don't hesitate to reach out if need any assistance from me or in case of you have any questions.

Find me on:- [Hashnode](https://avp23.hashnode.dev/) [LinkedIn](http://www.linkedin.com/in/amit-pawar-7b802b265) [Github](https://github.com/amitvpawar)

**Happy Learning!**
