Set up CloudWatch alarms and SNS in AWS
What is Amazon CloudWatch?
Amazon CloudWatch collects and visualizes real-time logs, metrics, and event data in automated dashboards to streamline your infrastructure and application maintenance.
What is Amazon SNS?
Amazon Web Services has included a notification service called Amazon Simple Notification Service. It offers a cheap infrastructure for the widespread distribution of communications, mostly to mobile users.
Task :
Create a CloudWatch alarm that monitors your billing and sends an email to you when it reaches $2.
To enable the monitoring of estimated charges
Open the AWS Billing console at https://console.aws.amazon.com/billing/.
Choose Billing Preferences from the navigation bar.
Decide on Billing Notifications Received.
choose Preferences to save.
Creating a billing alarm
Launch the CloudWatch interface.
Choose Alarms from the navigation pane, then select All alarms.
Choose Set alarm.
Select metric.
Choose Billing in Browse, then select Total Estimated Charge.
Choose metric after selecting the Estimated Charges metric checkbox.
Choose maximum under statistic.
select a period of 6 hours
Choose Static as the threshold type.
Choose Greater for Whenever EstimatedCharges is.
Choose a threshold value at which your alarm will go off. Here, the threshold amount is $2.
To get notifications while your alarm is in the ALARM state, enter an Amazon SNS subject under Notification.
By choosing "Create a new topic," you can either choose an already-existing Amazon SNS topic or start a brand-new one.
Choose Add notification if you want your alarm to deliver different alerts for the same alarm condition or for several alarm states.
select Next.
Give your alarm a name under "Name and description."
Make sure your configuration is right under Preview and create before selecting Create an alarm.
An alarm is set for billing.
Delete the billing alarm you just made.
I appreciate you continuing to read.