AWS offers numerous services and resources. It has so many features available to make it a complete cloud platform. But with such diverse options, there are many chances to make a small mistake and generate unexpected bills. There is one way to protect ourselves from this, using cloudwatch and setting up billing alarm.

No matter if you are an expert developer, administrator or just starting with AWS, you should always keep eye on your AWS usage and its bills. That is why, one of your first steps, when you create a new AWS account, should be setting up billing alarm for your account. It takes a few minutes to create billing alert and will save you headaches while working with AWS. So let us see how to create a billing alarm for AWS.

Go to Cloudwatch and Check current AWS Region

For setting up billing alerts we first need to go to Cloudwatch. You can search Cloudwatch from your AWS console. Alternatively, you can click on the link to go to AWS Cloudwatch – https://console.aws.amazon.com/cloudwatch/

Now you need to check your current region. This is an important step. You can check your region in the top-right corner. You have to select the region as Northen Virginia or “us-east-1”.

For all AWS accounts, Billing metric data is stored in N. Verginia region. So when you want to set up billing alarm you need to choose this region irrespective of region you use to set up AWS resources.

AWS Facts

Creating AWS Billing Alarm

Once you finished with the above step, click on alarms under Alarms in the left pane on Cloudwatch dashboard. Next, click on “Create alarm” button which should be on the right side.

In the image below, you can see that we are using a new interface for AWS. This will help keep this article usable for a longer time. Even if you are using an old AWS interface, you can follow the same steps with few changes to placements of buttons.

Billing alarm in AWS dashboard
Cloudwatch Billing Alarm Dashboard

Selecting Metric

Once you click on “Create alarm” button, on the next screen you have to select a metric for alarm. For that click on Select metric button. -> then find Billing in metrics list and click on it -> Then choose Total Estimated Charges -> finally choose the currency. In my case its USD. Then click on “Select matric” button.

Setting up Conditions

In the next step, you need to choose conditions that will trigger this alarm. Select the threshold type as Static. Then for an alarm condition, we will choose, “Greater/Equal”. Finally, we want to enter the threshold value for our bill. This totally depends on your usage of AWS. In this case, I am keeping it at $10. This means once we have bills greater than or equal to $10, we will get alert from AWS.

Setting up billing conditions
Setting Up Conditions to generate Billing Alerts

After this click on the Next button.

Creating SNS Topic

In this step, we need to create SNS (Simple Notification Service) topic to notify when this alarm is triggered. And this SNS topic, in turn, will send us an email alert for this alarm.

For creating SNS topic select Create a new topic radio button. Then you have to give a name for this topic, and email id to notify when this alarm is triggered. You can enter multiple emails in this box.

Creating SNS topic
Creating SNS topic to get notified on Alarm status

After that, click on “Create topic” button. This should create a new SNS topic.

Then click on “Next” button at the bottom of the screen

Giving Name to Alarm

In this step, give the appropriate name and description for this alarm. Then click on “Next” button

Billing Alarm description
Give Name and Description for Alarm

Verify details And Create Alarm

On the final step, you need to verify all details and click on “Create alarm” button at the bottom of the screen. This should take you to the billing dashboard again.

Here you can see that we have pending confirmation in the action column. This is regarding confirming our email/s that we have entered while creating an SNS topic. We need to verify all the emails that we have entered. AWS will send a verification link to all of those emails. Unless you verify, you will not receive alerts on that email.

Email verification pending
Email verification Pending

Verifying email

Check inbox for an email that you have entered in the previous step. You should see an email from AWS. Click on “Confirm subscription” link.

Confirmation email sent by AWS
Confirmation Email sent by AWS

Once you click on this link, It should confirm your Email and you will receive alerts on this email whenever our billing alarm is triggered.

Varying Alarm status

After confirming the email, refresh Cloudwatch billing alarm dashboard. You should see that there is no more pending confirmation action remaining in front of our alarm. This should complete set up for creating a billing alarm.

final step of billing alarm in aws
Billing alarm is set up and ready

Conclusion

That is it, You have configured your billing alarm and it should notify you if you cross your threshold amount for your bill in AWS. I hope you found this article useful. See you in next !!

Billing Alarm in AWS
Mahesh Mogal

Mahesh Mogal

I am passionate about Cloud, Data Analytics, Machine Learning, and Artificial Intelligence. I like to learn and try out new things. I have started blogging about my experience while learning these exciting technologies.

Table of Contents
    Add a header to begin generating the table of contents

    Stay updated with latest blogs

    Posts you may be interested in

    Manage S3 Bucket Polices
    S3

    Set, Get and Delete AWS S3 bucket policies

    In this blog, we are going to learn how to get, put and delete S3 bucket policies suing S3 Console as well as programmatically using AWS CLI & Python

    Manage S3 Bucket Polices
    Read More →
    iam policy vs s3 policy vs s3 acls
    S3

    IAM Policies VS S3 Policies VS S3 Bucket ACLs – What should be used?

    You can manage S3 permission using IAM policy or S3 Policy or S3 ACLs. We will understand the difference between them and use cases for each way.

    iam policy vs s3 policy vs s3 acls
    Read More →
    Create S3 bucket
    S3

    Create S3 bucket using AWS CLI and Python Boto3

    In this blog, we are going to learn how to create an S3 bucket using AWS CLI, Python Boto3 and S3 management console.

    Create S3 bucket
    Read More →

    Leave a Comment

    Your email address will not be published. Required fields are marked *

    Share via
    Copy link