AWS Billing and Cost Management: Best Practices for Controlling Your Spend
Set up budgets, anomaly alerts, cost allocation tags, and Savings Plans in the right order, and learn which AWS charges most often catch teams by surprise.
11 min read
AWS bills for what you use, which is great when you're starting small and frustrating when the invoice arrives higher than you expected. Most billing problems come from the same few gaps: nobody gets alerted, nobody can tell which project caused a charge, and resources keep running after they stop being useful.
The good news is that AWS includes solid tools for all of this. This guide covers how to set them up, in the order that makes the most sense.
At a glance
| What you need | AWS tool | What it does |
|---|---|---|
| One bill across accounts | AWS Organizations (consolidated billing) | Combines accounts into one bill and shares volume pricing |
| Warnings before a surprise bill | AWS Budgets | Alerts on actual or forecasted spend, with optional automated action |
| Unusual spending detection | AWS Cost Anomaly Detection | Uses your spending history to flag unexpected changes |
| Costs by project or client | Cost allocation tags | Splits your bill using tags you define |
| Day-to-day analysis | AWS Cost Explorer | Charts and filters your cost and usage history |
| Detailed billing data | AWS Data Exports (CUR 2.0) | Delivers recurring, granular cost data to Amazon S3 |
| Savings recommendations | Compute Optimizer, Cost Optimization Hub | Finds oversized and idle resources and ranks opportunities |
| Lower rates on steady usage | Savings Plans | Discounts usage in exchange for a one- or three-year commitment |
Start with account and billing access
Before you set up any reports, make sure the right people can see the bill and that AWS can reach them.
- Turn on billing access for IAM. By default, IAM users can't open the Billing and Cost Management console. The root user has to activate IAM access once, and you still need to attach IAM policies that grant the specific permissions each person needs.
- Add a billing contact. AWS lets you set separate alternate contacts for billing, operations, and security. Use a shared mailbox so important notices don't depend on one person's inbox.
- Use AWS Organizations if you have more than one account. Consolidated billing comes at no additional cost. It gives you one bill and shares volume pricing discounts, Reserved Instance discounts, and Savings Plans across accounts. Separate accounts for production and development also make it easy to see what each environment costs.
If your account is new, check which account plan you're on. The Free plan lasts up to six months or until your credits run out, whichever comes first, and doesn't charge you unless you upgrade. On a Paid plan, usage is billed at standard rates once your credits are used up or expire, so set up your budget before you upgrade.
Set up AWS Budgets first
If you only do one thing from this guide, make it this. Monitoring budgets and receiving notifications is free, and it takes a few minutes.
A simple starting point is one monthly cost budget for each account, set to what you expect to spend, with alerts such as:
- 50% and 80% of actual spend, so you can see the month progressing
- 100% of actual spend, so you know when you've gone over
- 100% of forecasted spend, so you get a warning while there's still time to act
Each alert can go to up to 10 email addresses and one Amazon SNS topic. Forecast alerts need about five weeks of usage data, so a new account should rely on actual-spend alerts at first.
Keep two limits in mind:
A budget doesn't stop spending on its own. A standard budget only notifies you, and your costs can keep rising after the alert.
Alerts aren't real time. AWS says budget information is updated up to three times a day, so there can be a gap between a charge and the alert. Set thresholds low enough to leave yourself room to respond.
Add budget actions for hard limits
Budget actions can respond when a threshold is reached, either automatically or after someone approves. They can apply an IAM policy or a service control policy, or target specific EC2 or RDS instances. The first two action-enabled budgets are free, and each one after that has a small daily charge.
Test these carefully, and be selective about using them in production. Stopping an instance in an Auto Scaling group, for example, usually doesn't hold: Auto Scaling can restart it or launch a replacement. Actions work best as guardrails on development accounts, or with manual approval on anything customers depend on.
Turn on Cost Anomaly Detection
Budgets catch spending that crosses a line you drew. Cost Anomaly Detection catches spending that looks wrong for your account, even if you're still under budget, like a runaway job or a misconfigured service.
It runs about three times a day after billing data is processed, using Cost Explorer data that can lag by up to 24 hours. A new monitor can take 24 hours to start working, and a newly used service needs 10 days of history before anomalies can be detected for it.
You can receive individual alerts through Amazon SNS, or daily or weekly email summaries. Individual alerts are the better choice for accounts where a problem can get expensive quickly. Third-party AWS Marketplace charges are generally not monitored, so use a budget to cover those.
Tag resources so every cost has an owner
Tags turn "our AWS bill went up" into "the staging environment for this project went up." Pick a short standard list and use the exact same spelling everywhere. These are a good start:
| Tag key | Example values |
|---|---|
Environment | production, staging, dev |
Project | customer-portal, data-pipeline |
Owner | platform-team |
Client | The client or cost center to bill |
Applying a tag isn't enough on its own. You have to activate each tag key before it shows up in billing tools. It can take up to 24 hours for a key to appear for activation, and up to another 24 hours to activate. In an organization, only the management account can manage these tags, so plan on doing this from there.
The most reliable way to keep tagging consistent is to apply tags through infrastructure as code, such as Terraform, CloudFormation, or the AWS CDK, so they don't depend on someone remembering. Keep sensitive information out of tags, since they appear in billing data.
Make cost review a habit
Cost Explorer is the best place for regular review. Its console is free to use, it shows up to 13 months of history, and its data refreshes at least once every 24 hours. Group by service first, then by account or tag, to find what changed. Its API is charged per request, which is worth remembering if you automate reports.
If you need to bill clients, build custom dashboards, or analyze costs by individual resource, set up AWS Data Exports. CUR 2.0 is AWS's recommended way to receive detailed cost and usage data, delivered on a recurring basis to an S3 bucket you control.
A short monthly routine is usually enough:
- Compare this month with last month, by service and by account.
- Investigate any increase you can't explain.
- Check how much spend is untagged, and fix the biggest gaps.
- Review open recommendations and pick a few to act on.
- Adjust budgets to match what you now expect to spend.
Remove waste before you commit
These charges are easy to miss because each one looks small or sits outside the main service you're thinking about. Rates below are examples from AWS's pricing pages at the time of writing, so check the current numbers for your region.
| Charge | Why it surprises people | What to do |
|---|---|---|
| NAT gateways | Billed by the hour and per GB processed. In US East (Ohio), that's $0.045 for each, or about $33 a month per gateway before any data is processed | Use free gateway VPC endpoints for S3 and DynamoDB traffic, and remove gateways you don't need |
| Public IPv4 addresses | $0.005 per hour, in use or idle, or about $3.65 a month each | Release unused addresses, and put services behind a load balancer where it reduces the count |
| Stopped EC2 instances | Instance time stops, but EBS volumes and Elastic IPs are still billed | Delete what you no longer need, and keep a snapshot if you might want it back |
| CloudWatch Logs | Log data is kept indefinitely by default | Set a retention period on every log group |
| Incomplete S3 uploads | Parts of unfinished multipart uploads can linger out of sight | Add a lifecycle rule to clean them up |
| S3 data that's rarely read | Everything stays in the storage class you first chose | Use S3 Intelligent-Tiering when access patterns are unclear |
| Data transfer out | Only the first 100 GB each month to the internet is free, combined across all services and most regions | Serve heavy traffic through a CDN where it makes sense, and watch this line in Cost Explorer |
Next, look at resources that are bigger than they need to be. AWS Compute Optimizer reviews your configuration and utilization metrics and recommends better-fitting options at no additional cost, once you opt in. Cost Optimization Hub brings rightsizing, idle resource, and commitment recommendations together across accounts and regions so you can prioritize them.
If you're running a small, steady workload on EC2, it may also be worth comparing the bundled pricing in our guide to Amazon EC2 vs. Amazon Lightsail.
Then lock in lower rates
Commitments should come after cleanup. Otherwise, you may end up committing to spend on resources you were about to remove.
Savings Plans give you lower rates in exchange for committing to a set hourly spend. The discounts below are AWS's stated maximums, and what you actually get depends on the term, payment option, and usage.
| Plan | Term | Maximum discount | Best for |
|---|---|---|---|
| Compute | One or three years | Up to 66% | Most teams, since it also covers Fargate and Lambda |
| EC2 Instance | One or three years | Up to 72% | Stable usage in one instance family and region |
| Database | One year | Up to 35% | Steady managed database usage |
| SageMaker | One or three years | Up to 64% | Ongoing machine learning workloads |
Commit to the level of usage you're confident will continue, not your peak. It's fine to start with a one-year term and part of your baseline, then add more later. AWS shows recommendations in the Billing and Cost Management console based on your past On-Demand usage.
Be careful with the purchase itself. A plan can only be returned if its hourly commitment is $100 or less, it was bought within the past seven days, and it's still the same calendar month.
For work that can handle interruption, such as batch jobs, CI builds, and some data processing, Spot Instances offer up to 90% off On-Demand prices. AWS normally gives a two-minute warning before reclaiming one, on a best-effort basis, so your workload needs to be able to stop and resume safely.
Bottom line
Work through AWS cost management in this order:
- Get billing access and contacts right.
- Add budgets and anomaly alerts so surprises reach you quickly.
- Tag resources so every cost has an owner.
- Review spending every month.
- Remove waste and rightsize what's left.
- Commit to Savings Plans for the usage you know will stay.
The first two steps take very little time, and they protect you while you work through the rest.
Need help getting your AWS costs under control?
At Odezzi LLC, we design, build, and manage cloud infrastructure for the systems our clients rely on, with monitoring and cost controls built in from the start.
Whether you're setting up a new AWS environment or trying to make sense of an existing bill, we can help. Contact us for more information!
*Odezzi LLC is not affiliated with Amazon Web Services. All product names, trademarks, and registered trademarks are property of their respective owners. AWS pricing and features change over time, so confirm current details with AWS before making purchasing decisions.
