How to Create AWS Billing Alerts for Your Costs
How to Create AWS Billing Alerts for Your Costs
Were you suddenly hit with a surprise AWS bill? Are you struggling to bring your costs under control?
Amazon Web Services may be the ultimate DevOps solution, but it comes at a (sometimes surprising) cost. At a time when budgets are under unprecedented stress, it’s never been more important for engineers to manage costs. While you might be able to request a refund for a one-time surprise, you should have systems in place to prevent these problems from occurring in the first place.
The good news is that AWS makes it easy to create billing alerts and even provides a more in-depth budgeting solution. After tagging your resources, it’s easy to measure your costs and usage across teams, projects and other metrics.
Let’s take a look at how to create basic billing alerts and AWS Budgets, as well as some best practices to keep in mind to effectively manage your AWS costs.
Creating Basic AWS Billing Alerts
Amazon makes it easy to create basic billing alerts using CloudWatch. If the estimated overall total exceeds a certain threshold, CloudWatch will trigger a message that is sent through the Simple Notification Service (SNS).
Start by enabling billing alerts:
- Open the Billing and Cost Management Console.
- In the navigation pane, choose Preferences.
- Select Receive Billing Alerts.
- Choose Save preferences.
Next, create your billing alert:
1. Open the CloudWatch Console.
2. In the navigation pane, choose Alarms > Create Alarm.
3. Choose Select metric > Billing > Total Estimated Charge.
4. Select the checkbox next to EstimatedCharges and choose Select metric.
5. For Whenever my total AWS charges for the month exceed, specify the monetary amount that must be exceeded to trigger the billing alert.
6. Choose or create a new notification list for send notification to.
7. Choose Create Alarm.
You can view the status of your billing alerts by clicking Alarms in the navigation pane in the CloudWatch console, as well as edit them by choosing Actions > Modify and delete them by choosing Actions > Delete.
Getting In-Depth with AWS Budgets
Billing alerts are great for solo developers or small projects that have minimal costs, but larger projects may have variable monthly budgets for individual AWS services. AWS Budgets is designed to address these issues.
Download our Checklist of Key Billing Metrics to Watch to ensure that you’re tracking the right metrics to measure and understand your AWS costs.
Start by creating a new AWS Budget:
- Open the AWS Budgets Console.
- Choose Create a budget.
- Choose Cost budget.
- Fill in the Budget details.
- Create up to five Alerts for each budget.
- Click Create to add the budget.
Example AWS Budgets Setup - Source: Amazon AWS
We recommend creating different budgets for different teams, projects or AWS services. You can customize budgets by services, linked accounts, tags, regions and other metrics, as well as adjust the charge type to include specific costs.
When building alerts, you can create alerts that are triggered when actual and/or forecast costs exceed a monthly amount or when they exceed certain thresholds (e.g. 80% usage). We recommend current cost, forecast cost and 80% usage alerts.
Simplifying with CloudForecast
AWS Budgets is an excellent way to ensure that costs are in-line across different teams, projects and services. The problem is that you have to choose between a lot of noise (e.g. daily alerts) or the risk of receiving alerts when it’s too late!
We built CloudForecast to help you avoid these problems. Our Daily AWS Cost Forecast Alerts alert you of any cost anomalies that need your immediate attention (before it’s too late) and integrate with Slack, PagerDuty and Opsgenie.
Slack Daily Cost Report - Source: CloudForecast
You can customize these alerts based on product, region, cost allocation tag or sub-account and select different recipients for different reports. In less than a minute, your team can read these reports and understand what’s happening.
We also simplify reporting for CFOs and C-level executives. Rather than spending hours building custom reports, we automatically generate monthly Excel reports that provide a high-level monthly overview of your AWS costs.
Monthly Financial Reports - Source: CloudForecast
Start your free trial and simplify your cost management for just $99 per month.
Get the Most Out of Billing Alerts
AWS Budgets and CloudForecast both require some setup in order to get the most out of your billing alerts.
Cost allocation tags are the single most critical part of understanding and managing your costs. These user-generated key-value tags enable you to categorize different AWS resources by team, project or other arbitrary measures.
Cost Allocation Tags Example - Source: AWS
We have already written a detailed blog post that shows you how to create tags, but there are a few critical best practices to keep in mind:
- Use a cross-functional team to identify tag requirements based on usage (e.g. engineer-defined) and business (e.g. cost-defined) goals.
- Create required and conditionally-required tags for new AWS resources to enforce naming standards and ensure that everything is tracked.
- Constrain tag values where possible with the AWS Service Catalog to avoid values that may throw errors when you’re trying to aggregate them.
- Implement a tag governance process focused on ensuring the proper tagging of resources and constantly remediate untagged resources to avoid things slipping through the cracks.
Aside from cost allocation tags, you should ensure that alerts are sent to the appropriate channels. CloudForecast automatically integrates with Slack, PagerDuty and Opsgenie, but AWS Budgets may require some extra setup.
The Bottom Line
AWS Budgets and billing alerts can help ensure that your AWS costs don’t spiral out of control. After tagging your resources, you can create budgets for different teams, projects or other metrics with alerts sent out via email.
If you’re looking for simpler reporting, greater insight and more convenient alerts, CloudForecast’s daily usage reports get you up to speed in less than a minute and alert you to potentially problematic cost trends before it’s too late.