Set Up AWS Billing Alerts
Build a cost monitoring system with budgets, alerts, and anomaly detection.
Introduction
30 Second Summary
Everyone has experienced the shock of an unexpected bill. Cloud computing makes it easy to spin up resources, but without guardrails, those resources can quietly rack up charges while you sleep.
In this project, you will set up a complete cost monitoring and alerting system in your AWS account. You'll configure budgets that email you before charges spiral, explore visual dashboards that show exactly where your money goes, and activate machine learning that watches for unusual spending patterns.
What You'll Build
A safety net of cost alerts, visual reports, and anomaly detection that protects your AWS account from surprise charges.
By the end of this project, you'll have:
- A zero-spend budget and a monthly cost budget with multi-threshold email alerts that notify you at 80% and 100% of your spending limit.
- Cost Explorer enabled with a custom report that breaks down your spending by service.
- A Cost Anomaly Detection monitor with an email alert subscription to catch unexpected spend spikes.
- Secret Mission: Configure a budget action that automatically restricts resource provisioning when your budget threshold is breached.
Are there any prerequisites?
None. This project walks you through everything from creating your AWS account to configuring each monitoring tool. All you need is an email address and a credit or debit card for AWS identity verification (you will not be charged if you stay within the free tier).
Set Up Your AWS Account
Before you can set up billing alerts, you need access to the AWS Management Console and its cost management tools.
The Billing and Cost Management console is your central hub for everything cost-related in AWS. In this step, you will sign in and confirm you can see billing data.
In this step, get ready to:
- Sign in to the AWS Management Console.
- Navigate to the Billing and Cost Management console.
- Verify you have billing access.
Create an AWS account or sign in to your existing one
You need an active AWS account to access billing tools. If you already have one, you can skip straight to signing in.
✔️ I already have an AWS account
- Open your browser and navigate to https://aws.amazon.com.
- Click Sign In to the Console in the top right corner.
- Enter your email address and password to sign in.
You should now see the AWS Management Console home page.
ⓧ I need to create an account
- Open your browser and navigate to https://aws.amazon.com.
- Click Create an AWS Account.
- Enter your email address and choose an account name.
- Follow the prompts to set a password, enter your contact information, and provide a credit or debit card for identity verification.
- Choose the Basic (Free) support plan.
- Complete the account verification process.
Will I be charged?
You will not be charged if you stay within the AWS Free Tier. The credit card is for identity verification only.
Once your account is confirmed, sign in to the AWS Management Console.
Bookmark the console
Bookmark https://console.aws.amazon.com for quick access. You will use the console throughout this project.
Navigate to the Billing and Cost Management console
The Billing and Cost Management console is your central hub for all cost-related features in AWS.
- In the AWS Management Console, click the search bar at the top of the page.
- Type Billing and select Billing and Cost Management from the results.
You should now see the Billing and Cost Management home page with several widgets displayed.
What are these widgets?
The home page shows widgets that give you an overview of your cloud spending. The key ones are:
- Cost summary shows your current cost trends compared to last month.
- Cost monitor displays your budgets and any detected anomalies.
- Cost breakdown shows a six-month breakdown to help identify trends.
- Savings opportunities shows recommendations for reducing your spend.
Verify billing access
If you signed in with the root account (the email and password you used to create the account), you already have full billing access. If you are using an IAM user, you need to confirm billing data is visible.
✔️ I can see the billing dashboard
You have billing access. No further action is needed. You are ready to move on.
ⓧ I see an access denied message
IAM users cannot access billing data by default. The root account owner needs to enable it.
Ask the root account owner to follow these steps:
- Sign in to the AWS Management Console with root account credentials.
- Click the account name in the top navigation bar, then select Account.
- Scroll down to the IAM User and Role Access to Billing Information section.
- Click Edit.
- Select the Activate IAM Access check box.
- Click Update.
After this is enabled, sign back in with your IAM user and refresh the Billing and Cost Management page to confirm access.
Still seeing access denied?
If you activated IAM access but still cannot see billing data, your IAM user may be missing the required billing permissions policy. The root account owner also needs to attach an IAM policy (such as the AWS managed Billing policy) to your IAM user or role.
help me fix billing access for my IAM user in AWS
Your AWS account is ready and you have confirmed billing access. Next up, you will create your first budget to catch any charges above $0.
Create a Zero-Spend Budget
The most common mistake new AWS users make is leaving a service running without realizing it costs money. A zero-spend budget solves this by emailing you the moment anything on your account exceeds $0.
In this step, you will create your first budget using AWS Budgets. This budget acts as your first line of defense against surprise charges.
In this step, get ready to:
- Navigate to the AWS Budgets page.
- Create a zero-spend budget using a simplified template.
- Verify the budget appears on your dashboard.
Open AWS Budgets
AWS Budgets lives inside the Billing and Cost Management console you opened in the previous step.
- In the Billing and Cost Management console, choose Budgets from the left navigation pane.
- Choose Create budget at the top of the page.
What is AWS Budgets?
AWS Budgets lets you set custom spending limits and receive email alerts when your costs approach or exceed those limits. You can create up to 2 active budgets at no cost (AWS provides 60 free budget days per month).
Use the simplified template
AWS provides pre-built templates so you do not have to configure alert thresholds manually. The zero-spend template is designed specifically for learners and new accounts.
- Under Budget setup, choose Use a template (simplified).
- Under Templates, select Zero spend budget.
- Under Email recipients, enter your email address.
- Choose Create budget.
What does the zero-spend template do?
This template sets a budget of $0.01 and alerts you as soon as any spending exceeds AWS Free Tier limits. It is the simplest way to catch accidental charges before they add up.
Verify your budget appears
- Confirm that your zero-spend budget is now listed on the Budgets dashboard.
You should see your new budget with a $0.01 budgeted amount and your email address listed as a subscriber. The status should show as normal (green) because you have not exceeded $0 yet.
Don't see your budget listed?
Make sure you chose Create budget at the final step. If you navigated away before confirming, return to Budgets in the left pane and try again.
If you are using an IAM user and see a permissions error, your root account owner needs to enable IAM access to billing information.
Help me troubleshoot why my budget didn't save
Your first safety net is live. Next up, you will create a more customizable monthly cost budget with multiple alert thresholds so you get advance warning as your spending climbs.
Create a Monthly Cost Budget with Alerts
Your zero-spend budget catches any spending above $0. But what happens when you intentionally start using paid services and need a real dollar limit?
In this step, you will create a custom monthly cost budget with a fixed dollar amount you choose. You will also configure two alert thresholds that warn you at 80% and 100% of that limit.
In this step, get ready to:
- Create a custom cost budget with a fixed monthly amount.
- Add alert thresholds at 80% and 100% of your budgeted amount.
Start a new custom budget
The zero-spend budget used a simplified template. This time, you will use the advanced customization option to control your budget name, period, amount, and alert thresholds.
- From the Budgets page, choose Create budget at the top of the page.
- Under Budget setup, choose Customize (advanced).
- Under Budget types, select Cost budget.
- Choose Next.
Why Customize (advanced) instead of a template?
Templates are great for common scenarios like a zero-spend alert. The advanced option gives you full control over your budget period, dollar amount, and how many alert thresholds you add.
AWS Budgets supports up to 5 alerts per budget, so you can layer multiple warning levels on a single budget.
Configure your budget details
- For Budget name, enter Monthly-Cost-Limit.
- For Period, choose Monthly.
- For Budget renewal type, choose Recurring budget.
- For Budgeting method, choose Fixed.
- For Budgeted amount, enter a dollar value you are comfortable with. For example, enter 10 if you are staying within the free tier, or 50 if you are running paid services.
- Choose Next.
What does Fixed and Recurring mean?
A Fixed budgeting method means your budget amount stays the same every period. A Recurring renewal type means the budget resets automatically at the start of each month.
Together, these settings give you a consistent monthly spending cap that you never have to manually recreate.
Add alert thresholds
Alert thresholds tell AWS when to send you a notification. You will set two: an early warning at 80% and a final alert at 100%.
- Choose Add an alert threshold.
- Set the threshold value to 80.
- Choose % of budgeted amount.
- Select Actual spend.
- Enter your email address under Email recipients.
Now add the second threshold.
- Choose Add an alert threshold again.
- Set the threshold value to 100.
- Choose % of budgeted amount.
- Select Actual spend.
- Enter the same email address under Email recipients.
- Choose Next.
- Review your budget settings on the summary page.
- Choose Create budget.
Why 80% and 100%?
The 80% alert gives you time to react before you hit your limit. You might decide to shut down unused resources or adjust your usage.
The 100% alert tells you the ceiling has been reached. At that point, you know to stop provisioning new resources until the next billing cycle.
You should now see both budgets listed on the Budgets dashboard. Your Monthly-Cost-Limit budget appears alongside your zero-spend budget from the previous step.
Don't see your new budget listed?
Make sure you chose Create budget on the final review page. If you only clicked Next, you may still be in the creation wizard.
If you see an error about the budget name, check that you typed Monthly-Cost-Limit exactly, with hyphens and capital letters.
Help me troubleshoot my budget creation
Your account now has two layers of protection. The zero-spend budget catches accidental charges, and the monthly cost budget warns you as intentional spending approaches your limit. Next up, you will enable Cost Explorer to see exactly where your money is going.
Enable Cost Explorer and Analyze Spending
Your budgets are now standing guard over your spending limits. But budgets only tell you when you cross a threshold.
What if you want to see exactly where your money is going, broken down by service, over time? That is what Cost Explorer does. In this step, you will enable Cost Explorer and create a saved report that shows your spending grouped by AWS service.
In this step, get ready to:
- Enable Cost Explorer and explore the dashboard.
- Understand the key metrics on the Cost Explorer dashboard.
- Create and save a custom report grouped by service.
Enable Cost Explorer
Cost Explorer gives you a visual breakdown of your AWS spending. You need to enable it before you can see any data.
- In the Billing and Cost Management console, choose Cost Explorer from the left navigation pane.
- If this is your first time, you will see a welcome page. Choose Launch Cost Explorer.
What is Cost Explorer?
Cost Explorer is a free tool built into your AWS account that lets you visualize, filter, and forecast your spending. It shows your costs for the last 13 months and can forecast the next 18 months.
Once you enable it, it cannot be disabled. That is fine. There is no cost to using Cost Explorer in the console.
Why does the dashboard show $0?
Data takes up to 24 hours to appear for a new account. If your account is brand new, the dashboard will show $0 everywhere. This is completely normal. Check back tomorrow and your data will be populated.
Explore the dashboard
Once Cost Explorer loads, you land on the Cost Explorer dashboard. Take a moment to look at what it shows you.
- At the top, find your Month-to-date costs and Forecasted month end costs.
- In the center, find the graph of your daily costs.
- Below the graph, look for your top 5 cost trends.
What do these dashboard sections mean?
- Month-to-date costs shows how much you have spent so far this month, compared to the same point last month.
- Forecasted month end costs estimates what your total bill will be at the end of the month.
- The daily cost graph shows your unblended costs day by day.
- Top cost trends highlight which services or categories are driving changes in your spending.
Create a custom report
The dashboard gives you a high-level overview. Now you will create a custom report that breaks down your costs by service, so you can quickly see which services are costing you the most.
- Choose Explore costs in the upper-right corner of the daily cost graph to open the full report view.
- In the Group by dropdown, select Service.
- Set the date range to the last 3 months using the date range controls.
- Choose Save as new report.
- Name the report Monthly-Cost-By-Service and save it.
Why group by service?
Grouping by service shows you a stacked bar chart where each color represents a different AWS service. This makes it easy to spot which service is driving your costs. For example, if EC2 is consuming 80% of your budget, you will see it immediately.
Your saved report will appear in your Reports list for quick access any time you return to Cost Explorer.
- Confirm your report is saved by checking the Cost Explorer Saved Reports section in the left navigation pane. You should see Monthly-Cost-By-Service listed.
Don't see your saved report?
- Make sure you chose Save as new report and entered the name before saving. If you just closed the page, your configuration was not saved.
- Check the left navigation pane under Cost Explorer Saved Reports. Custom reports appear separately from default reports.
Help me find my saved report in Cost Explorer.
You now have full visibility into your spending patterns. Next up, you will configure Cost Anomaly Detection to automatically catch unexpected spending spikes before they become expensive surprises.
Configure Cost Anomaly Detection
Your budgets alert you when spending crosses thresholds you defined. But what about unexpected cost spikes you didn't predict?
In this step, you'll configure Cost Anomaly Detection. This feature uses machine learning to establish a baseline of your normal spending patterns, then alerts you when something looks unusual.
In this step, get ready to:
- Open Cost Anomaly Detection and review the default settings AWS created for you.
- Create a custom monitor that tracks all AWS services.
- Set up an alert subscription with your email and a custom spending threshold.
Open Cost Anomaly Detection
- In the Billing and Cost Management console, choose Cost Anomaly Detection from the left navigation pane.
You should see that AWS has already created a default monitor and a daily alert subscription for you.
Why is there already a monitor here?
When you enabled Cost Explorer in the previous step, AWS automatically set up a default monitor and daily summary alert subscription. The default alerts trigger for anomalies exceeding $100 and 40% of expected spend.
Those thresholds are designed for production accounts with real workloads. For a personal or learning account, $100 is far too high to be useful. That's why you'll create a custom monitor with a much lower threshold next.
Create a custom monitor
- Choose the Cost monitors tab.
- Choose Create monitor.
- For Monitor name, enter All-Services-Monitor.
- Under Monitor method, select Managed by AWS.
- For the dimension, select AWS services.
- Choose Next.
What does Managed by AWS mean?
An AWS-managed monitor automatically tracks up to the top 5,000 values per dimension. It adapts as you start using new services, so you never have to manually update the monitor when your account grows.
Set up an alert subscription
You're still inside the monitor creation wizard. This next page lets you configure how you want to be notified when an anomaly is detected.
- Under Alert subscription, choose Create a new subscription.
- For Subscription name, enter My-Spend-Alerts.
- Under Alert recipients, enter your email address.
- For Threshold, choose an absolute threshold.
- Enter a dollar value that makes sense for your account. For example, $5 for a personal learning account or $50 for a production account.
- Choose Create monitor.
You should see your new All-Services-Monitor listed on the Cost monitors tab. Your My-Spend-Alerts subscription is visible under the Alert subscriptions tab.
When will I start receiving alerts?
Cost Anomaly Detection runs approximately three times a day after billing data is processed. It uses Cost Explorer data, which has up to a 24-hour delay.
New services need about 10 days of historical usage data before anomalies can be detected for them. The longer the monitor runs, the smarter its baseline becomes.
Don't see the Cost monitors tab?
Make sure you navigated to Cost Anomaly Detection in the left navigation pane, not to a different Billing section. The page should have both a Cost monitors tab and an Alert subscriptions tab at the top.
If you see an access denied message, your IAM user may not have permission to view billing data. The root account owner needs to enable IAM access to billing information.
Help me troubleshoot Cost Anomaly Detection access issues in my AWS account.
Secret mission
Configure a Budget Action
You have alerts that tell you when spending exceeds your threshold. But what if you could make AWS automatically lock down resource provisioning the moment your budget is breached? In this secret mission, you will configure a budget action that applies an IAM Deny policy to prevent new EC2 instances from being launched when your costs hit 100%.
Clean Up Your Resources
Clean Up Your Resources
This project runs entirely within AWS free tier limits, so there are no ongoing costs to worry about. Your 2 budgets fit within the 60 free budget-days per month allowance, Cost Explorer is free to use in the console, and Cost Anomaly Detection is free.
Decide whether to keep your resources running, pause them to come back later, or delete them entirely.
Resources you used:
- 2 AWS Budgets (zero-spend budget and Monthly-Cost-Limit).
- Cost Anomaly Detection monitor (All-Services-Monitor) and alert subscription (My-Spend-Alerts).
- Cost Explorer (enabled, free to use in the console).
- Saved Cost Explorer report (Monthly-Cost-By-Service).
Why isn't Cost Explorer in the delete options?
Cost Explorer cannot be disabled once enabled. It is free to use in the console, so there is no cost impact from leaving it active. The Cost Explorer API costs $0.01 per request if used programmatically, but you did not use the API in this project.
Keep everything running
No action needed. Choose this if you want your cost monitoring safety net to stay active.
- Your budgets will continue to alert you if spending approaches your thresholds.
- Cost Anomaly Detection will keep watching for unusual spend patterns.
- Cost Explorer will keep updating your cost data at least once every 24 hours.
- All of these resources are free within the limits you configured. They actively save you money by alerting you to unexpected charges.
Recommended for most learners
These cost monitoring tools protect your account from surprise bills. There is no reason to remove them unless you are closing your AWS account entirely.
Pause - I'll come back to this later
These are passive monitoring services that do not consume compute resources or incur charges. There is nothing to pause.
- AWS Budgets and Cost Anomaly Detection do not run servers or processes on your behalf.
- They monitor billing data that AWS already collects and send you email alerts when thresholds are crossed.
- Keeping them active costs nothing within the free tier allowance (60 free budget-days per month covers your 2 budgets).
If you want to stop receiving email notifications without deleting anything, you can edit each budget and remove your email address from the alert recipients.
Delete - I don't want to use this again
Remove all project resources to start fresh. Follow these steps to delete each resource.
Delete your AWS Budgets
- Open the Billing and Cost Management console at https://console.aws.amazon.com/cost-management/.
- In the navigation pane, choose Budgets.
- Select both budgets from your list (the zero-spend budget and Monthly-Cost-Limit).
- At the top of the page, choose Actions, then choose Delete.
- Choose Confirm.
Delete your Cost Anomaly Detection monitor and subscription
- In the Billing and Cost Management console, choose Cost Anomaly Detection from the navigation pane.
- Choose the Cost monitors tab.
- Select your All-Services-Monitor monitor.
- Choose Delete.
- In the Delete cost monitor dialog box, choose Delete.
- Choose the Alert subscriptions tab.
- Select your My-Spend-Alerts subscription.
- Choose Delete.
- In the Delete alert subscription dialog box, choose Delete.
Delete your saved Cost Explorer report
- In the Billing and Cost Management console, choose Cost Explorer from the navigation pane.
- Open your saved reports list and delete the Monthly-Cost-By-Service report.
What about Cost Explorer itself?
Cost Explorer cannot be disabled once enabled. This has no cost impact since console access is free. Only the Cost Explorer API incurs charges ($0.01 per request), and you did not use the API in this project.
Nice Work!
Nice Work!
You just built a complete cost safety net for your AWS account. No more surprise charges sneaking up on you.
Here's what you learned:
- Created AWS Budgets with multi-threshold alerts that email you at 80% and 100% of your spending limit.
- Enabled Cost Explorer and saved a custom report grouped by service to see exactly where your money goes.
- Configured Cost Anomaly Detection with a dedicated monitor and email subscription to catch unexpected spending spikes.
- Configured a budget action that automatically restricts resource provisioning when your budget threshold is breached.
Ready to quiz yourself?