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.
Steps:
- Go to Cloudwatch alarms and create a new alarm.
- Select Metrics - Billing > Total Estimate Charge
- Select Condition =>$2
- Create a new topic to send email notifications.
- Select the created topic
- Create the alarm
- The alarm is created but it gives a warning that the SNS subscription is pending.
- Go to your Gmail and confirm the subscription.
Validate the same by refreshing the Alarm page. The alarm is created and we will receive an email alert if the billing is crossing the threshold of $2.
Thank you :)