Logo

dev-resources.site

for different kinds of informations.

How to avoid unexpected AWS costs

Published at
4/20/2021
Categories
aws
budget
costmanagement
Author
eriklz
Categories
3 categories in total
aws
open
budget
open
costmanagement
open
Author
6 person written this
eriklz
open
How to avoid unexpected AWS costs

Have you experimented with some new and interesting AWS service and their features, learned a few interesting pieces, and then continued with your regular work - only to find an unwelcome surprise on the AWS bill at the end of the month?
Or perhaps someone in your organization asked you about a cost increase on one of the AWS accounts?

This is something that probably most cloud workers have experienced - aw, I forgot to shut off that thing...

There is a feature/service that AWS provides that can at least reduce the risk of that painful surprise - AWS Budgets. This article will show you some info on setting that up via the AWS Management Console. For a scripted approach, see the link at the end of the article.

AWS Budgets are located under the Billing Dashboard in AWS Management Console, which you can get to from the account menu in the upper right - assuming you have the privileges to access the Billing Dashboard.

Get to Billing Dashboard

Once in the Billing Dashboard, there is an entry in the left pane that leads you to the Budgets section.

Select Budget

There are fundamentally four types of budgets that you can create - cost budget, usage, reservation, and savings plan budget. The cost budget is a budget that monitors the amount of $$$ you spend or is forecasted to spend. The usage budget concerns capacity metrics and how much you consume there - for example, GB storage. Reservation and Savings plan budgets are ways to monitor utilization or coverage of your reserved instance allocation or savings plan.

4 types of budget

Since we deal with unexpected costs and bills in this article, we focus on cost budgets. You can click on Create Budget on the right side to create a new budget.

There are a few steps to go through to create a cost budget:

  • Enter a name for the budget

  • Select a budget period. This is the type of period that the budget is valid for. For a regular cost budget, this can be daily, monthly, quarterly, or annually - but there are restrictions on the daily option. You do want a monthly budget if you are going to catch unexpected costs, most likely.

  • The type of period, which can be recurring or expiring. An expiring budget is a one-off kind of budget and it will go away after it expires. So an expiring budget might be what you prefer for a temporary project or setup if you want to track costs for that particular project only.

  • The start and end month, if you have an expiring monthly budget.

Budget options

  • Select if the budget limit is fixed for each month, or different for each month.

  • The budget limit for the period. It is a single value with a fixed budget. This is the cost limit (in USD) that you set for the period.

  • By default, the budget is valid for the whole AWS account and all regions. You apply various filters to reduce it to the resources that are relevant to you. See more below.

Budget options

  • There are also options for cost aggregation and what types of costs should be included in the budget. I have so far kept the defaults here.

Cost types

  • You can then set up notification thresholds for the budget. This can be for the actual incurred cost or a forecasted cost for the current period. The threshold can be a percentage of the budget limit or an actual value.

  • Notifications can be delivered as email, via SNS, or integration via AWS Chatbot.

Notifications

  • It is also possible to set up actions that trigger when a threshold is reached. I will not go in further into this part here, but this may be interesting for a more elaborate budget setup.

  • Once you have gone through all options, you can look at the summary and confirm your choices.

Budget summary

There is a multitude of options to set and we have not covered all the cases here! Additional filtering options can pick specific regions and specific resources, for example via tags.

A caveat with the tags is that the tags you use must have been activated as cost allocation tags. This can also be done via the Billing Dashboard. Any tag that has been used can be activated as a cost allocation tag.

Are you going to set up a new budget when you have a new project, going through these steps? In practice, I seldom do this in the AWS Management Console.

To try to make this process a bit smoother I made a script to create/update budgets. It takes an opinionated and simplified approach, but only a single command is needed, for example:

./Set-SimpleBudget.ps1 -BudgetName MyBudget -Amount 100 -NotificationEmail alert@example.com
Enter fullscreen mode Exit fullscreen mode

This is the minimal approach with all the defaults, which will set up an expiring cost budget (100 USD monthly) for the current month, with two thresholds - >80% of actual cost and >100% of the forecasted cost. This is for all resources in the account and all regions. You can also filter on tags and regions.

If this is interesting, check out the description for that script in my other budget post - How to avoid unexpected AWS costs.

budget Article's
30 articles in total
Favicon
Never Get Shocked by Your AWS Bill Again! 💰 Setting Up Smart Cost Alerts
Favicon
Best Monthly Budget Planners to Make Financial Management Smarter
Favicon
Building a Developer-Friendly Workspace on a Budget
Favicon
DevOps4Devs: set a budget
Favicon
The Pillars of Site Reliability Engineering Building Resilient Systems
Favicon
💰 Avoiding the $100,000 Surprise: How to Set Up AWS Budgets and Cost Alerts Like a Pro
Favicon
Achieving Financial Freedom: Practical Tips and Strategies
Favicon
How Frontier Airlines Keeps Fares Low
Favicon
Managing Business Finances: Tips for Staying on Top of Your Budget
Favicon
Home-improvement financing tips for your next project
Favicon
The Best Cheap SEO Services india
Favicon
Refurbished Computer Hardware: Cure for the Common Datacenter
Favicon
Revolutionizing Affordable Gaming: Radiance Gaming PC RX 580 8GB RGB
Favicon
Building Budget Planner app with Lyzr SDK
Favicon
How to set up AWS Budget Alerts to prevent surprises
Favicon
ChatGPT-Powered Finance App
Favicon
A guide to crafting an effective budget for SRE investments
Favicon
In what ways can small businesses leverage AI to streamline operations on a budget?
Favicon
What is Wrong with Classical Custom Development
Favicon
Best printer under $200
Favicon
Free AWS Bootcamp: Week 0 - Part 2
Favicon
AWS Budgets: Update alert thresholds unlimitedly with Lambda
Favicon
Performance Budget - Idea, Core Web Vitals, Tools
Favicon
Creating an online budget form 1/5
Favicon
SMB Telecom Services: How To Make Sure You Are Not Overpaying
Favicon
How to avoid unexpected AWS costs
Favicon
Makerwork 001
Favicon
How to Pay off Your $20,000 Loan in One Year or Less
Favicon
Fight Covid By Folding At Home (On A Budget)
Favicon
Where Did My Money Go

Featured ones: