DEV Community

Cover image for AWS Budgets and Billing Alerts: Set Them Up Before a Surprise Bill
epifive
epifive

Posted on Originally published at epifive.com

AWS Budgets and Billing Alerts: Set Them Up Before a Surprise Bill

To avoid a surprise AWS bill, create a Zero spend budget and a Monthly cost budget in AWS Budgets, turn on Free Tier usage alerts, and optionally add a CloudWatch billing alarm. Do this before you launch anything. These alerts notify you; they do not stop spending, and they lag actual usage, so check the console regularly too.

Who this is for and what you will have at the end

This guide is for people opening a new AWS account for learning, a side project or a small business, and for anyone who has an account with no spending alerts. At the end you will have four layers of protection and an understanding of their limits:

  • A budget that alerts when you exceed the Free Tier.
  • A monthly cost budget with actual and forecasted alerts.
  • Free Tier usage alerts by email.
  • Optionally, a CloudWatch alarm on estimated charges.

The steps follow the AWS documentation in the References. Console labels change, so follow the nearest match if something differs. Prices are in USD. For the equivalent on Azure, see Azure Budgets and cost alerts.

Know what each tool does

Tool What it does Where Notes
Free Tier usage alerts Emails you when usage is forecast to exceed a set percentage of a Free Tier limit Billing preferences Default threshold 85%
AWS Budgets, cost budget Alerts when actual or forecasted cost passes a threshold Billing and Cost Management > Budgets Information updated up to three times a day
AWS Budgets, actions Applies an IAM policy or SCP, or targets EC2 or RDS instances, at a threshold Budgets Needs setup and a role
CloudWatch billing alarm Alarm on the EstimatedCharges metric CloudWatch, US East (N. Virginia) Uses current charges, no projections

AWS Budgets can alert on both actual spend (after it accrues) and forecasted spend (before it accrues), according to AWS's documentation. CloudWatch billing alarms trigger only when current billing exceeds the threshold and do not use projections.

Step 1: Check your billing access and email

  1. Sign in to the AWS Management Console and open the Billing and Cost Management console at https://console.aws.amazon.com/cost-management/.
  2. Know which email gets alerts. Free Tier usage alerts go to the root user's email address by default, and you can add more addresses in Billing preferences.
  3. If you want IAM users to see billing information or receive these alerts, AWS says you must also activate IAM user access to billing information. Only the root user can do this, and it is a separate setting from the alerts.

Avoid working as the root user day to day. Our guide on AWS IAM basics explains users, roles and policies.

Step 2: Turn on Free Tier usage alerts

  1. In the AWS Billing console, go to Billing preferences.
  2. Turn on Free Tier usage alerts.
  3. Add any extra email addresses in the same section.

AWS says these alerts email you when usage is forecast to exceed a percentage of a Free Tier limit, with a default of 85%.

Understand which Free Tier applies

AWS's Free Tier documentation describes three kinds: Always Free offers that never expire, 12 Months Free offers that start when you open your account, and Free Trials that start when you activate a specific service. It also says new accounts may be able to choose between a Free plan, which limits spending to promotional credits and stops services when credits run out, and a Paid plan, which charges for usage beyond free offers. AWS notes plan options and credit amounts change, so check the current terms and your credit balance and expiration in the Billing console. The Free Tier page in the console shows usage against each offer's limit. For a cross-provider comparison, see AWS vs Azure vs Google Cloud free tiers.

Step 3: Create a Zero spend budget

The Zero spend budget notifies you after your spending exceeds AWS Free Tier limits. It is the simplest first alert on a new account.

  1. Open the Billing and Cost Management console at https://console.aws.amazon.com/cost-management/.
  2. In the navigation pane, choose Budgets.
  3. At the top of the page, choose Create budget.
  4. Under Budget setup, choose Use a template (simplified).
  5. Under Templates, choose Zero spend budget.
  6. Enter the budget name and the Email recipients, then update any other details.
  7. Choose Create budget.

AWS describes this template workflow as a single page, unlike the 5-step workflow for customizing a budget. To change settings later, choose Custom under Template settings.

Step 4: Create a monthly cost budget

  1. Repeat the steps above, but choose Monthly cost budget as the template.
  2. Enter a budget amount in USD that you would be unhappy to exceed, for example a small figure for a learning account.
  3. Add your email recipients and create the budget.

AWS describes this template as a monthly budget that notifies you if you exceed, or are forecast to exceed, the budget amount. Using both actual and forecasted alerts gives you an early warning and a firm one.

Add more than one threshold

If you want alerts at several levels, use the advanced workflow by choosing Customize (advanced) instead of the template, or edit the budget afterward. A common pattern is an early alert on forecasted spend, an alert near the limit, and one when the limit is reached. AWS's example for tracking a monthly cost budget configures notifications at 80 percent of the budgeted amount.

Verify your email recipient

When you add an email address, AWS Budgets sends a verification email from an @aws.com sender address, and only verified addresses receive notifications. The recipient must choose the link in the email and sign in to the AWS account that added it. Key details from AWS:

  • You can add up to 10 email recipients per budget notification.
  • Verification links expire 12 hours after they are sent. Choose Resend verification on the budget detail page for a fresh link.
  • Statuses shown include Active, Pending and Inactive. Choose Send Notification for an Inactive address.
  • If an organization uses an email allow list, add the @aws.com domain, and check spam folders.
  • An address used across different AWS accounts must be verified separately in each account.

An unverified address means silent budgets, so confirm the status shows Active before you rely on it.

Create a budget with the AWS CLI

AWS's documentation includes this CLI pattern for a monthly cost budget with an actual-spend alert. Replace the account ID, amount and address, and verify parameters against the current AWS CLI reference before use.

aws budgets create-budget \
  --account-id 123456789012 \
  --budget '{
    "BudgetName": "monthly-cost-limit",
    "BudgetLimit": {"Amount": "10", "Unit": "USD"},
    "TimeUnit": "MONTHLY",
    "BudgetType": "COST"
  }' \
  --notifications-with-subscribers '[{
    "Notification": {
      "NotificationType": "ACTUAL",
      "ComparisonOperator": "GREATER_THAN",
      "Threshold": 80,
      "ThresholdType": "PERCENTAGE"
    },
    "Subscribers": [{"SubscriptionType": "EMAIL", "Address": "admin@contoso.com"}]
  }]'
Enter fullscreen mode Exit fullscreen mode

Step 5: Add a CloudWatch billing alarm (optional)

A CloudWatch alarm on estimated charges is a second, independent signal. It is useful because it tracks the EstimatedCharges metric directly.

Enable billing alerts

  1. Open the Billing and Cost Management console and choose Billing Preferences in the navigation pane.
  2. By Alert preferences, choose Edit.
  3. Choose Receive CloudWatch Billing Alerts, then Save preferences.

AWS says you must be signed in as the root user or an IAM user with permission to view billing information, that it takes about 15 minutes after first enabling before you can see billing data, and that after you enable billing alerts you cannot disable data collection, though you can delete alarms you created. Accounts that are part of the Amazon Partner Network do not get billing metrics in CloudWatch.

Create the alarm

  1. Open the CloudWatch console at https://console.aws.amazon.com/cloudwatch/ and change the Region to US East (N. Virginia). Billing metric data is stored there and represents worldwide charges.
  2. In the navigation pane, choose Alarms, then All alarms, then Create alarm.
  3. Choose Select metric. In AWS Namespaces, choose Billing, then Total Estimated Charge. Select the EstimatedCharges metric and choose Select metric.
  4. For Statistic, choose Maximum. For Period, choose 6 hours.
  5. For Threshold type, choose Static. For Whenever EstimatedCharges is, choose Greater, and enter a value in USD.
  6. Under Additional Configuration, set Datapoints to alarm to 1 out of 1 and Missing data treatment to Treat missing data as missing.
  7. Under Notification, make sure In alarm is selected and choose or create an Amazon SNS topic that includes your email address. Confirm the SNS subscription email when it arrives.
  8. Name the alarm and choose Create alarm.

The metric is in USD only. If you create the alarm after charges already exceed the threshold, it goes to the ALARM state immediately. If you cannot see Billing or Total Estimated Charge, enable billing alerts and switch to US East (N. Virginia).

What these alerts cannot do

AWS is explicit about the limits of Budgets:

  • Budget information is updated up to three times a day, typically 8 to 12 hours apart.
  • There can be a delay between incurring a charge and receiving the notification, because of the delay between resource use and billing. You might incur additional costs that exceed the threshold before AWS Budgets can notify you, and costs may keep increasing after the notification.
  • Notifications warn you; by default nothing is stopped.

In practice, a forgotten large instance or a service with usage-based charges can cost money for hours before an alert arrives. Treat alerts as a smoke alarm, not a sprinkler.

Budget actions for automatic response

Budget actions can run automatically or after your manual approval when a threshold is exceeded or forecast to be. Per AWS, available actions include applying an IAM policy or a service control policy (SCP), and targeting specific Amazon EC2 or Amazon RDS instances in your account. From a management account you can apply an SCP to another account, but you cannot target EC2 or RDS instances in another account. AWS's example applies a custom Deny IAM policy that restricts provisioning more EC2 resources and targets specific EC2 instances in us-east-1.

Actions need a role that lets AWS Budgets run them, which you set up before configuring the action. According to AWS's pricing page at the time of writing, monitoring budgets and receiving notifications is free, the first two action-enabled budgets per month are free, each additional action-enabled budget costs $0.10 per day, and each emailed budget report costs $0.01.

Review routine and cleanup

  1. Open the Billing console's Bills page and the Free Tier page weekly while learning.
  2. Review Cost Explorer for trends. AWS says Cost Explorer is enabled when you create your first budget, and its graph can take up to 24 hours to appear.
  3. When you finish an experiment, delete what you created: stop or terminate instances, delete volumes and snapshots, release unused addresses and remove test databases. A resource you forget keeps billing.
  4. Delete the CloudWatch alarm or budget if you no longer need them. Budgets monitoring is free, so leaving it on costs nothing.

Troubleshooting

  • No alert emails: check the recipient status in the budget (Pending or Inactive means unverified), your spam folder, and any allow list for @aws.com.
  • Billing metric missing in CloudWatch: enable Receive CloudWatch Billing Alerts, wait about 15 minutes, and switch to US East (N. Virginia).
  • IAM user cannot see billing: the root user must activate IAM user access to billing information.
  • Alert arrived after the money was spent: expected, given the update delay. Add a lower threshold and use forecasted alerts.

Checklist

  • Turn on Free Tier usage alerts in Billing preferences.
  • Create a Zero spend budget and a Monthly cost budget with verified email recipients.
  • Add forecasted and actual thresholds.
  • Optionally enable CloudWatch billing alerts and create an alarm in US East (N. Virginia).
  • Remember alerts lag and do not stop spending; consider budget actions for hard control.
  • Clean up resources when you finish.

References


This guide was researched and drafted with AI assistance and checked against the vendor documentation listed in its References. Read the maintained version and related guides on EpiFive.

Top comments (1)

Collapse
 
neerajbhakta profile image
Neeraj Bhakta •

Good list. One thing I'd add from getting caught myself: make sure the alert email goes to an address you actually read, not just the root account inbox, and send it to a second person if it's a team account. Also the forecasted-cost alert at around 80% is the one that gave me real warning time; the actual-cost alert often arrives after the damage is mostly done. A forgotten NAT gateway or idle load balancer is the classic cause of the surprise bill on a side project.