Set up CloudWatch alarms and SNS in AWS

Set up CloudWatch alarms and SNS 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, variables you can measure for your resources and applications.

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.

You can use SNS Notification Service to send

a) Application to Application (A2A)

b) Application to Person (A2P)

c) Mobile Text messaging(SMS)

d) Email Messaging

❄Tasks:

Create a CloudWatch alarm that monitors your billing and emails you when it reaches $2.

Step 1: Log in to AWS using the root or IAM users. (if you have permission to create EC2 instance as an IAM user)

Step 2: Search Billing Preferences and change the Alert Preferences by click on edit.

Step 3: Now Search CloudWatch on the Search bar of AWS and go over the Alarm then Create Alarm.

Step 4: To create an Alarm, Select a metric option and click Next.

Step 5: Select Region "N.Virginia" because the billing option is available there.

Step 6: Select USD and click on "Next".

Step 7: Verify the below section. The statistic should be Maximum.

Step 8: For Creating Alarm, when the bill is 2$. Give value 2 and check the threshold type.

Step 9: Check the Additional Configuration, It should be the same.

Step 10: Create a topic for getting an Alarm on your email.

Step 11: Verify Topic "Covid-19" Created Successfully.

Step 12: Create the subscription to subscribe and get the notification from your email ID.

Step 13: After that, you will get one mail in your registered mail-id. Go and subscribe to it, then check the status will change from pending to confirmed.

Step 14: Now Go to Alarm on Configure Sections, and add the topic that you created previously.

Step 15: Give a Name to your alarm, with the same name you will get an email.

Step 16: Now Verify it's created successfully. In state section "OK" is there.

Thank you for giving your precious time to read this blog/article and if any suggestions or improvements are required on my blogs feel free to connect on LinkedIn Unnati Gupta. Happy Learning 💥🙌***!!!***