Please follow & like us :)

Now that you have set up your AWS account and enabled multi-factor authentication, it’s time to set up an AWS billing alarm in order to be notified whenever your account reaches a certain limit.

In this example, I’m going to set up a billing alarm that will send an email whenever my AWS billing goes above $10 USD.

This is a 2 step process whereby we first create an e-mail notification with the Simple Notification Service (SNS) followed by creating our billing alarm within CloudWatch.

Setup SNS E-Mail Notification

Once you have signed in to your AWS console, click on services, and in the search files, type in sns. Click on Simple Notification Service.

Amazon AWS Billing Alarm

Next, click on ‘Topics’ within the left-hand side menu.

Amazon AWS Billing Alarm

Give your topic a name and display name. In my case, I used ‘Billing-Alarm-10-USD’ for the Name and ‘Billing Alarm 10 USD’ for the Display name. Click ‘Create topic’ at the bottom of the page.

Amazon AWS Billing Alarm

You will now see that your AWS billing alarm topic has been created successfully. Displayed are some details. If you already have a lot of topics setup, you will want to take note of the ARN value, as we will be using this in the next step.

Amazon AWS Billing Alarm

Within the same window as the screenshot above, click on the orange button entitled ‘Create Subscription’. Enter in the word ‘Billing’ within the Topic ARN field, the ARN value for your topic will automatically pop up. Select your Billing topic.

Amazon AWS Billing Alarm

Under Protocol, select Email and within the Endpoint field, type in the email address where you will receive the Billing alarm whenever costs reach above $10 USD. Click on ‘Create Subscription’ below.

Amazon AWS Billing Alarm

Your email subscription is now setup, and you can see within the Details window that it is a member of the Topic we created earlier called ‘Billing-Alarm-10-USD’

Amazon AWS Billing Alarm

Shortly you will receive an email asking you to confirm your email. Simply click on the link provided which will confirm your subscription. Click ‘Topics’ within the left-hand side menu. You will see that your subscribed email address is now confirmed.

If you make a mistake on the email address or don’t click on the link in the confirmation email, AWS will remove the subscription within 3 days. You cannot manually delete it. However, you can manually delete a confirmed subscriber.

Amazon AWS Billing Alarm

Now it’s time to head on over to CloudWatch. Click on Services at the top of the page and within the search field type in ‘cloudwatch’. Click on CloudWatch once it automatically pops up.

Setup CloudWatch Billing Alarm

Amazon AWS Billing Alarm

Once you’re in CloudWatch, click on ‘Alarms’ on the left hand side.

Amazon AWS Billing Alarm

Click the orange button, ‘Create alarm’ at the top right-hand side.

Use the following settings for the metric section:

  • Metric Name: EstimatedCharges
  • Currency: USD (Change for your preference)
  • Statistic: Maximum
  • Period: 6 hours

Use the following settings for the Conditions:

  • Threshold type: Static
  • Whenever EstimatedCharges is..: Greater/Equal
  • than…: 10 (Optionally change this to the threshold you want)

Amazon AWS Billing Alarm

For step 2, we configure the action. Use the following settings:

  • Whenever this alarm state is…: in Alarm
  • Select an SNS topic: Select an existing SNS topic
  • Send a notification to…: Billing-Alarm-10-USD

Amazon AWS Billing Alarm

We now define an Alarm name for our alarm, along with an optional description. My Alarm name will be ‘Billing-Over-10-USD’ and for the description, I will use ‘AWS Billing is greater than $10 USD’

Amazon AWS Billing Alarm

You are now presented with a summary of the settings you have used to create your Billing Alarm. If you need to change anything you can click on the Edit button for that section or click on the previous button. If you are happy with all your settings click ‘Create Alarm’

Amazon AWS Billing Alarm

Your Billing Alarm has now been created and is gathering data.

Amazon AWS Billing Alarm

After a few hours, when your Billing Alarm has collected enough data, it will change status from INSUFFICIENT to OK, as you can see in the screenshot below.

Amazon AWS Billing Alarm

Enable Free Tier Usage Alarms

The next alarm we are going to configure is useful if you are using the AWS free tier. Enabling this option will notify you via email when you are close to reaching your monthly free tier limit or if it has been exceeded.

Click on Services at the top right of the screen and search for Billing. Click on the Billing service. Within the Billing service, click on ‘Billing preferences’ under the Preferences section on the right-hand side.

Tick the box next to ‘Receive Free Tier Usage Alerts’ and enter an email address where you wish to receive the alerts. Once you are done click the ‘Save preferences’ button.

Amazon AWS Billing Alarm

Be the first to comment

Leave a Reply

Your email address will not be published.


*


*

This site uses Akismet to reduce spam. Learn how your comment data is processed.