We’ve all heard of the horror stories - a surprise $20,000 bill and a whole world of hurt for the AWS account owner. Thankfully most of those cases are a case of accounts getting hacked and Amazon reversing the charges.
AWS Budgets exists to prevent those accidents from happening on your own time.
By letting you set thresholds for your AWS costs, usage, and reservation utilization, AWS Budgets gives you the power to know as soon as you go over budget. You can even use them to warn you if your forecasted usage will go over budget, letting you adjust course ahead of time to save money!
That’s why today we’ll be covering:
- What is AWS Budgets?
- Why AWS Budgets is vital
- Drawbacks to be aware of
- How to use AWS Budgets
- AWS Budgets tips and best practices
Let’s get started.
What is AWS Budgets?
AWS Budgets is a nifty little tool that’s built into your AWS account. By letting you set budgets for your account, AWS Budgets helps you to keep an eye on your costs and usage figures.
At its simplest, Budgets will send you a notification (via email or Amazon SNS) when your spending goes over a certain amount, when you’ve used a certain amount of data, and/or when your usage statistics fall below a certain percentage.
For example, let’s say that you’ve set up three different budgets. One is a cost budget of $550, another is a usage budget of 80 GB per month, and the last is a utilization (reservation) budget of 90%. These could all be related to the same thing, but note that you can easily set these budgets to be applied to different segments of your account (eg, dev environment costs vs EC2 RI utilization).
This means that you will be automatically notified when your spending reaches or exceeds $550, your usage meets or exceeds 80 GB in a given month, and when your usage falls below 90%.
In this way it would almost be more accurate to call this tool “AWS Thresholds”, as it is more centered around warning you when your account is going over budget or under-utilized than it is setting a complex budget that justifies your spending. However, while this difference is worth bearing in mind when considering your AWS budget (as in, working out what your budget should be), it’s not enough of a problem to warrant confusing ourselves by calling the tool something different.
There are two other elements to AWS Budgets. The first is the ability to set actions to occur when your budget limits are hit, known as AWS Budget Actions.
Budget Actions (such as preventing further spending or allocating higher data limits) can be automatic or you can choose to review them before they trigger to avoid any potential slip-ups. Unlike the base AWS Budgets these actions are also charged to your account; the first two actions that trigger per month are free, above which there’s a daily cost of $0.10 for every day an action is triggered.
The last element is AWS Budgets Reports, which does exactly what you would expect. These generated reports of your budgets versus your actual costs, usage, and utilization can be sent to your email address on a daily, weekly, or monthly basis and cost $0.01 per report.
Why AWS Budgets is vital
Picture this; you’re in charge of your entire engineering team. For some of you this might not be a stretch, but bear with us here.
It’s your responsibility to make sure that everyone performs their duties consistently and effectively while sticking to your cost and resource budgets from higher up. You’ve already argued for your team to have as much on the budget as they can, so there’s no leeway here.
You need to stick to the plan. Going over budget would be disastrous.
So you’re as careful as possible to hit your targets while spending as little as possible. Every so often you bump up resource allocation for Redshift clusters and allow for greater resource allocation because it’s all necessary to achieve your OKRs, but you’re strict with doing nothing more.
This leaves you all the more surprised and unprepared for when the monthly bill comes in and you’re past the point of fixing what is, in fact, you spending double your budget.
The problem is that most teams have no idea what they’re spending for the month until the bill comes in, at which point there’s no room to course correct. AWS isn’t exactly forthcoming with the information you need to easily tell at a glance what’s being spent, what’s forecasted to be spent, and how that lines up with your hard-line budgets.
This is where AWS Budgets really shines.
AWS Budgets allows you to set limits which notify you and anyone else who’s relevant when things go over budget. This means that you can immediately perform damage control and stop the situation from spiraling into something much worse.
It can even send you notifications for when your projects are forecast to go over budget, letting you proactively solve the problem before it does any harm.
That’s not even going into the actions you can set to occur if those budget limits are hit or forecast to be hit. These can let you automatically solve the problem, be it by halting efforts until you can perform damage control (if the budget is inflexible) or assigning a higher budget to keep things ticking over (if there’s room to expand).
Drawbacks to be aware of
The biggest drawback to using AWS Budgets isn’t anything to do with the tool itself or how it’s set up or functions. The no. 1 enemy when it comes to budgeting is yourself.
Adhering to a specific budget (and using AWS Budgets to achieve that goal) doesn’t mean that your finances are in order and under control. It doesn’t even mean that you’re spending the right amount, as that entirely depends on the accuracy and worth of your budgets themselves.
For example, let’s say that you have set a budget of 80 GB of data usage per month for a specific element of your AWS account, and you’re enforcing that with the help of AWS Budgets. How do you know that 80 GB is the best budget to set?
We won’t go into too much detail here (this isn’t a post on how to create the perfect AWS budget figure, though if you’re interested in this, check out our Definitive Guide to the AWS Budget), but generally you need to make sure that your budget was created while considering the following four elements:
- It needs to reflect a specific, predictable business demand
- It includes all costs required to meet your projections
- It should be divided by business purpose
- The final budget should be reverse-engineered for monitoring
In other words, your budgets should be linked to specific needs, account for everything that is required to achieve your goals, split according to the results they’re intended to achieve, and be taken as parts of the whole that is the overall budget given to you by your financial department.
Without this care and effort being taken before you start setting your budgets, there’s every likelihood that you’ll be setting up useless notifications, warnings, and thresholds with AWS Budgets.
Otherwise, there really aren’t that many other drawbacks to using this tool. Some product reviews mention their frustration with Amazon not advertising the tool enough and that it’s a little difficult to set up, but since you’re reading this post you already know about it (no marketing needed) and are likely already familiar enough with AWS to make setting up your budgets a cinch.
The only other negatives that you could level at AWS Budgets is that setting a budget doesn’t prevent you from spending more (unless you have an action set up to prevent that somehow), and that the notification emails for hitting your limits could come as an unwelcome surprise to those who receive it.
However, as long as your budgets are carefully thought out, your actions are configured to prevent nasty mishaps, and your notifications are only being sent to those who actually need to see them, there’s really no reason to not use AWS Budgets.
Unless, of course, you don’t have an AWS account. In which case, why have you read this far?
How to use AWS Budgets
You know what AWS Budgets is, why it’s useful, and what to be wary of when you’re using it. Now it’s time to learn how to get your budgets set up and running smoothly.
First you need to understand the three types of budgets available to you and decide which to create from the Budgets section of your AWS Cost Management dashboard. These are cost budgets, usage budgets, and reservation budgets.
Cost and usage budgets are simple - they are limits set for your spending and data usage amounts. Reservation budgets instead work by triggering when the utilization of a certain workload goes below the value that you set (eg, 80%).
No matter what type of budget you select, proceed to name your budget (we’d recommend something immediately identifiable, such as “GBs Stored S3 - US”) and configure your settings according to what that budget is designed to do. This includes deciding whether the budget should be monthly, quarterly or annually, whether the budget will expire after a certain amount of time, and when the budget will start to take effect.
You can also choose to set a variable budget, but unless you’re accounting for a variable workload a fixed budget will be more reliable.
The main complexity in setting up your budgets comes now via setting the budget parameters. This will entirely depend on how your AWS account has been set up, what workloads you have, how you’re tagging, recording, and managing them, and so on. For example, you could budget everything related to a specific project (eg, Project 1) by telling your budget to search for anything with the tag “Project 1”.
Remember - everything that falls under the parameters you set here will contribute towards the budget you’re setting up, so make sure that the only workloads being included are actually relevant.
Round it out by setting up the alerts for your budget and you’re all ready to roll. That is, if you don’t have another budget to set up.
AWS Budgets tips and best practices
To round things out, let’s have a quickfire round of AWS Budgets best practices to let you hit the ground running.
First up, in order for a user to create budgets they will also need permission to:
- View your billing information
- Create Amazon CloudWatch alarms
- Create Amazon Simple Notification Service (Amazon SNS) notifications
If you need a team member to have access to your budgets to create or edit them (or as a backup if you’re unable to do it yourself), make sure that they’re already set up with these permissions first to avoid confusion and frustration down the line.
Second, if your AWS account (or whatever you’re applying the budget to) is still new, bear in mind that AWS needs 5 weeks of usage data in order to forecast results. This means that any budgets you set that are based on forecasts instead of real-time figures will not work until there are at least 5 weeks of data for them to use. Plan in advance accordingly.
Third, each alert based on actual values (not forecasts) is sent once per budget period. This means that if you hit the alert limit (say, 70% of your budget), that alert will not repeat for further spending - it only triggers when you initially reach your budget threshold.
Finally, if you aren’t sure whether your budget needs to repeat or end after a set amount of time, default to having it repeat. It’s always better to keep receiving notifications about an out-of-date budget and be reminded that it exists than to have a useful budget delete itself and stop your important alerts without warning.