Creating Some Billing Alerts With AWS Budgets and CloudWatch
Contents
In this post we’ll be setting up some billing alerts on our AWS account. I’ll be following the AWS documentation to create one on CloudWatch, and will set one up on AWS Budgets as well.
Why create both? Firstly I intend to set both alerts to a low amount and then compare the outputs of both methods of alerting to see if one is preferable. Also there is a difference in cost between the two methods - outside of free tier CloudWatch custom metrics cost 0.30 USD per metric per month and alarms cost 0.10 USD per standard alarm metric. Conversely with AWS Budgets the first two budgets are free, and each subsequent budget incurs a 0.02 USD daily cost. So I’m interested to see what I get for my money.
First of all, let’s enable billing alarms. This is done via Billing Preferences, where there’s an option to Receive Billing Alerts. Enable it, and then put an email address in the Receive Free Tier Usage Alerts textbox and enable that too. Then select Save Preferences.
While we’re here, let’s set up an AWS Budget. Under Cost Management, select Budgets, then on the next screen select Create A Budget. At this point there are options for budgets concerning cost, usage and reservations - we’ll choose cost. The budget setup screen is then displayed:
I have created a budget called $0.01 budget with a budgeted amount set at $0.01. That shouldn’t take long to hit, although I’m still in my free tier so it won’t be immediate.
The alert must then be configured:
I have set the alert to send based on actual costs, based on 100% of the budgeted amount. Finally I’ll add an email address - there is an option to use an SNS topic, although on this occasion I won’t be using that as I want to see how the Budgets alerts differ to the CloudWatch ones (if they do). If they’re both using SNS that won’t be a fair test.
I’ll now set up a second AWS Budget with a different configuration - it’ll be largely the same although this is set to Forecasted Costs as opposed to Actual Costs. I have concerns that, based on the comments AWS have added next to it, this one may not trigger as I’m in the free tier:
Now let’s set up the CloudWatch alert. This will need a switch to the N. Virginia (US-East-1) region - as mentioned last time there is where AWS keep all the billing data, and is therefore where the alert must be set up.
From here it’s just a case of following the guide above. Step ten makes use of the SNS topic created last time:
Finally, after completing this I’ll switch back to the Ireland region to make sure I keep track of where I’m deploying my AWS services. Nothing worse than creating something and then completely losing track of it or rendering it useless because you’re based in the Ireland region but were using the console in London, Paris or wherever. This is already happened more times than I care to admit.
Thanks for reading ~~^~~
Author Damien Jones
LastMod 2019-10-24