Suriya Tasmim Disha
Disha's Blog

Follow

Disha's Blog

Follow

How To Create An AWS Billing Alarm

Suriya Tasmim Disha's photo
Suriya Tasmim Disha
·Dec 8, 2022·

4 min read

How To Create An AWS Billing Alarm
Play this article

Keeping an eye on the bills for using the AWS services is vital. However, it’s not convenient to always watch over the real-time AWS usage bills.

Let’s assume, you have a budget to spend USD 100 per month. You are checking your usage bills daily and it’s way below the threshold. Everything is fine so far. One day, mistakenly and unknowingly, you or your developers start running an AWS service and the usage bill crossed your threshold limit. By the time you get to know about this, the bill is already way over USD 100. This type of situation is very common and it can lead you or your company to a huge financial crisis. But, you can avoid this kind of crisis, by simply creating an AWS billing alarm.

AWS billing alarm will send you notifications whenever it crosses your threshold limit. And, in this article, I am going to show you how you can set up your AWS billing alarm step by step.

Prerequisites:

  1. AWS account

    Note: If you don’t have an AWS account yet, you can follow this AWS - Create Your Free Account In 7 Easy Steps guide and create one.

  2. Signed in as an AWS root user or have proper IAM permission.

Important: After signing into the AWS account you need to select US East (N. Virginia) region. All the billing metric data including estimated charges for every AWS service that you use and the estimated overall total of your AWS charges are stored in this region. So, whenever you are performing any creation, modification, or deletion of billing, you need to be in this region.

aws-console-select-region.png

Enable Billing Alarm Monitoring

  1. Sign in to AWS Management Console.

  2. Click on the account name at the top right corner and select Billing Dashboard from the options.

choose-billing-option.png

  1. Choose Billing Preferences from the navigation pane.

billing-dashboard.png

  1. In the billing preferences page, select Receive Billing Alerts and choose Save Preferences.

billing-preferrence-page.png

Important:

  • After enabling the billing alert, it is not possible to stop data collection. But you can delete the billing alarms at any time.

  • After enabling the billing alert for the first time, it can take about 15 minutes to get a view of the billing data and create any billing alarms.

Creating a Billing Alarm

  1. Go to AWS Cloudwatch.

  2. Expand Alarm and select All alarms from the navigation pane.

billing-dashboard.png

  1. Choose Create Alarm.

all-alarms-page.png

  1. Click on Select metric.

select-metric.png

  1. From the Browse tab choose the Billing option.

browse-billing.png

  1. After choosing the Billing option, choose Total Estimate Charge.

total-estimated-charge.png

  1. Select the row for estimated charges and then choose Select matrix.

select-and-save-metric.png

  1. In the Specify metric and conditions:

    • For the Threshold type, select Static.

    • For the Whenever EstimatedCharges is…, choose Greater> threshold.

    • For the than…, input a threshold value that will trigger the billing alarm.

    • Choose Next.

after-select-matrix.png

  1. In the Configure actions Notification block, for the Alarm state trigger, select In alarm state, which will trigger the AWS SNS to send you the notification.

  2. For the Send a notification to the following SNS topic, select an existing SNS topic or create a new one. If you choose to create a new SNS topic, then:

*   For the **Create a new topic…**, input a topic name.

*   For the **Email endpoints that will receive the notification…,** you can add one or multiple email addresses.

*   Choose **Create topic**.

*   Choose **Next.**

set-sns.png

Note: If you want to send multiple notifications for the same alarm state or multiple alarm states, select Add notification. After that repeat the steps from 12-14.

Important: After creating the topic, you need to accept the SNS subscription from your email.

  1. Add the Alarm name, and select Next.

add-billing-name.png

  1. Finally, check all the information in the Preview and create step, then choose Create alarm.

create-alarm.png

Now if you go to the alarm dashboard, you will see your billing alarm in the table.

updated-alarm-dashboard.png

Also, you will be able to view the alarm details and metrics, if you click on the alarm name.

alarm-details.png

Important: In the AWS Free Tier, you can use up to 10 alarms and 1,000 e-mail notifications each month for free.

So, I hope you were able to successfully create a billing alarm. Now, have more fun with AWS. Thank you for reading!!!

Did you find this article valuable?

Support Suriya Tasmim Disha by becoming a sponsor. Any amount is appreciated!

Learn more about Hashnode Sponsors
 
Share this