For beginners, Amazon Web Services has a Free Tier, which is very generous. However, as you start to stretch the free tier to it’s limits, it’s good to have billing alerts set up. Essentially you’ll get an email when your bill approaches a certain amount.
Setting up billing alerts uses CloudWatch, which is not really the first service the beginners run into. This post shows how to set up AWS Billing Alerts, with screenshots, so you do not have to be familiar with CloudWatch to set one up. I strongly recommend setting the Billing Alerts up, regardless of free tier - having heard and seen horror stories in the recent past.
Log in to the AWS Console.
Next, search for CloudWatch, and select it. You should see something like this -
Click Billing from the left menu, which will show the below -
On this screen, click Create Alarm.
This will open up a form, where we will be able to set up threshold, as well as an email address to get notified on.
First, we set the dollar amount. The image below shows
$5 as the threshold.
Next, on the same screen, we set the notification. Under Actions, click New List. When the text field shows up, enter your email. Then click Create Alarm.
Once you do, this popup would prompt to confirm the email address that had just been entered.
Look for a confirmation email in your inbox, and click the subscription confirmation link. The page would look something like this -
Click View Alarm, and you will see this page with the new alarm created. Initially the Alarm State will be
INSUFFICIENT_DATA, which means the alarm has just been started, and cloudwatch needs to gather more data around this metric to determine the correct state.
Give it a minute or two, and refresh the page, you will that the alarm is now in
If the billing exceeds the threshold, the alarm state will be
ALARM, and a notification will be triggered. The state will remain
ALARM unless a value satisfying the threshold is achieved.
Hope this post helps you keep a closer eye on your AWS account charges, and avoid any surprises. I’ve seen cases from runaway lambdas, to accidentally leaving expensive instance types running for weeks. Protection is the key!