Hey learners, you have been using aws services atleast for last 45 days. Have you ever wondered what happen if for any service is charging you bill continously and you don't know till you loose all your pocket money ?
Hahahaha😁, Well! we, as a responsible community ,always try to make it under free tier , but it's good to know and setup something , which will inform you whenever bill touches a Threshold.
What is Amazon CloudWatch?
Your Amazon Web Services (AWS) resources and the AWS apps you use are continuously monitored by Amazon CloudWatch. Metrics, which are variables you can monitor for your resources and applications, can be gathered and tracked using CloudWatch.
What is Amazon SNS?
Since 2010, 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; I hope you learned something!!❤️🙌