How to set AWS Billing Alert-Alarm

Use AWS Billing Alert and save yourself from unexpected AWS bills.  AWS is the leading cloud provider in the market. Many Organizations are currently using the AWS for hosting their infrastructure, creating their business applications and for many more use cases.  Hence many people want to learn AWS and get some practical knowledge about the AWS cloud.

AWS is very generous when it comes to their free tier offerings but not all the services are free. One should be careful while using AWS services in terms of costings.  AWS works on pay as you go model. AWS Billing Alert will help to get the notification about the billing. AWS alarm will monitor the estimated AWS charges and sends alert when we reach to billing threshold which we set.

Get started with creating the AWS Billing Alarm!!

AWS Billing Alert

Prerequisites

  1. You must be login as root user i.e. your email id which you used while creating the AWS account
  2. In case you are logged in IAM user, then it should have the IAM permissions to access the Billing information.
  3. Your account should not be the part of Amazon Partner Network (APN)
  4. You need to switch to US East (N. Virginia) Region to enable this alert
  5. You must be having valid email address to receive the AWS Billing Alert

 

Enable the monitoring of estimated charges

Login to AWS console : https://aws.amazon.com/console/

Switch to the US East (N. Virginia) region from your home region

AWS Switch Region

Open the AWS Billing Dashboard as shown in below picture

AWS Billing Dashboard

From the left side navigation pane, choose Billing Preferences.

Billing Preferences

 

From Alert Preferences, choose Edit

 

Alert Preferences

 

Choose Receive CloudWatch Billing Alerts

 

Receive CloudWatch Billing Alerts

Your alert preferences were updated successfully.
Preferences Saved

 

Create AWS Billing Alert

 

Search for the CloudWatch in search bar and click on it

AWS CloudWatch

 

In the left navigation pane, choose Alarms, and then choose All alarms.

All Alarms

 

Now Choose Create alarm to create the CloudWatch alarm

 

Create Alarm

 

Choose Select metric. In Browse, choose Billing, and then choose Total Estimated Charge.

 

 

 

Choose the Metric Name as EstimatedCharges, Currency as USD, Statistics as Maximum and Period 6Hours 

Refer the below picture for more understanding

Metric

 

Under Conditions, Choose Threshold type as Static, Whenever EstimatedCharges is as Greater > Threshold, than 2 USD. Here we want AWS Billing Alarm to send the alert when our estimated charges will be greater than 2USD. You can select any threshold value as per you preference.

Conditions

 

Check Graph on the above screen. You can see your threshold value displayed on the graph.

Check Graph

 

In the Additional Configurations, Select Datapoints to alarm as 1 out 1 and Missing data treatment as Treat missing data as missing.

Choose Next.

Additional Configurations

 

In Configure actions, Select Alarm state trigger as In alarm

Send a notifications to the following SNS topic: If you have any existing topic then please select that, otherwise Select Create new topic

 

Configure actions

 

Select Create new topic, Give any name to that topic and add your valid email address. Select Create topic

Please note you can choose multiple Email address by adding comma separation.

e.g. : abc.example.com,xyz@example.com

CreateNewTpoic

Scroll down and choose Next

Create Alarm_success

 

Next screen, Add Name of your choice and description, Choose Next

Add Name and Description

 

After this, Preview and Create will open. It is like summary page where all our configuration can be checked.

Please go through the page and check if there is any error. When everything looks perfect, click on Create Alarm.

The Billing Alarm will get created. It will take some time to change the state from Insufficient data to OK.

Insufficient data

 

After few minutes, the Alarm state state get automatically changed to OK.

Ok State

 

Congratulations !!! We have successfully created our first AWS Billing Alarm which will send us the email alert when AWS charges crosses threshold value.

Please Note: We can create multiple alerts for different threshold value.

After creating AWS Billing Alarm, you need to check the AWS SNS, Topics

Search SNS, in AWS search bar

Open the SNS service, Select Topics. You will find the name of your topic which you used while creating the Billing Alarm.

Choose that topics, Under subscription, check the pending confirmation.

You have login to your email box and accept this topic subscription.

After you subscribed to this topic via your email, the status will change to Confirmed.

SNS Topics

 

Conclusion

Take charge of your AWS billing and optimize your resources efficiently with AWS Billing Alert. Save your lot of money in case you forget to stop/terminate any AWS service which cost you money. Stay within your budget, track your spending and happy learning. See you next time.

You can check awesome cloud related stuff on our Blog.

Leave a comment