You will not know your AWS bill is $3,000 this month until the month is over. Unless someone set up a budget, AWS does not send an alert when you cross $500, $1,000 or $2,000. The invoice arrives after the fact, and whatever caused the spike has been running for weeks by then.
I see this on accounts where billing setup got skipped at launch. A misconfigured NAT Gateway, a forgotten EC2 instance, a Lambda function stuck in a loop, a developer who tested something and never cleaned up. None of these is catastrophic alone. Without an alert, you find out from the invoice.
Why a budget alert matters
A budget alert will not catch every problem. It will catch a $400 month turning into a $1,200 month before it turns into a $3,000 month. That is the whole job.
Monitoring budgets and receiving notifications is free. The only budget feature that costs money is budget actions (automatic responses like applying an IAM policy): the first two action-enabled budgets each month are free, then it is $0.10 per day for each additional one. You do not need actions on day one.
One limit to know about: Budgets data is refreshed up to three times a day, so an alert can lag the spend. AWS says this in its own docs. Set thresholds with some headroom.
Check your own account
Start with what already exists. In the console, open Billing and Cost Management and choose Budgets. If the list is empty, you have no alerts.
From the CLI:
ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text)
aws budgets describe-budgets --account-id "$ACCOUNT_ID"
If nothing comes back, nothing is set up. Then check Cost Anomaly Detection, which is a separate feature:
aws ce get-anomaly-monitors
aws ce get-anomaly-subscriptions
Newer accounts sometimes have a default monitor that AWS created when Cost Explorer was first opened. If both come back empty, nobody gets an email when spend does something odd. Also look at who owns the email address on the account. An alert sent to a person who left last year is no alert.
Set up a monthly cost budget
The quick way, in the console:
- Open Billing and Cost Management, then Budgets, then Create budget.
- Under Budget setup, choose Use a template (simplified).
- Choose Monthly cost budget.
- Enter a budget name, your monthly amount and the email addresses to notify.
- Choose Create budget.
The template alerts you if you exceed, or are forecasted to exceed, the amount. Set the amount a bit above what you normally pay, not at some hopeful number.
If you prefer the CLI, or want this in version control, create two files. First budget.json:
{
"BudgetName": "monthly-cost",
"BudgetLimit": { "Amount": "1000", "Unit": "USD" },
"BudgetType": "COST",
"TimeUnit": "MONTHLY"
}
Then notifications.json, one alert at 80% of actual spend and one at 100% of forecasted spend:
[
{
"Notification": {
"NotificationType": "ACTUAL",
"ComparisonOperator": "GREATER_THAN",
"Threshold": 80,
"ThresholdType": "PERCENTAGE"
},
"Subscribers": [
{ "SubscriptionType": "EMAIL", "Address": "billing@example.com" }
]
},
{
"Notification": {
"NotificationType": "FORECASTED",
"ComparisonOperator": "GREATER_THAN",
"Threshold": 100,
"ThresholdType": "PERCENTAGE"
},
"Subscribers": [
{ "SubscriptionType": "EMAIL", "Address": "billing@example.com" }
]
}
]
Create it:
aws budgets create-budget \
--account-id "$ACCOUNT_ID" \
--budget file://budget.json \
--notifications-with-subscribers file://notifications.json
The command prints nothing on success. Run describe-budgets again to confirm.
Actual versus forecasted
An actual alert fires when money has already been spent past the threshold. A forecasted alert fires when AWS predicts you will cross it by month end. The forecast is the useful one for catching a runaway resource in week two instead of week four. I set both: actual at 80% and forecasted at 100%. A budget can hold up to five notifications, so there is room to add an actual 100% as well.
Add Cost Anomaly Detection
A fixed budget does not know that your normal spend on one service just tripled. Cost Anomaly Detection does. It uses machine learning on your spend history, and it is free.
In the console, open Billing and Cost Management, choose Cost Anomaly Detection, then Cost monitors, then Create monitor. Pick AWS services with the managed method, then create an alert subscription. Individual alerts need an Amazon SNS topic. Daily or weekly summaries go straight to email. A new monitor can take up to 24 hours to start detecting.
If you want someone watching
Both setups take about ten minutes. An alert only helps if someone reads it and acts, though. If you would rather hand that over, it is part of what I do under ongoing AWS management.