AWS Budgets

Budgets let you set a spending threshold and get alerted (or take action) before you blow past it.

AWS Budgets lets you set a custom cost or usage limit and be notified when your actual or forecast spend approaches it. It is the single most important guardrail for anyone learning AWS.

Budget types

  • Cost budget — alert when spend crosses an amount, e.g. $10/month.
  • Usage budget — track a specific metric, e.g. GB of S3 storage.
  • Savings Plans / RI budgets — monitor coverage and utilization.

Alerts and actions

Attach notifications at thresholds like 80% and 100% of the budget. With budget actions, AWS can even apply a restrictive policy or stop instances automatically when a limit is hit.

Example

Example · json
{
  "BudgetName": "monthly-cap",
  "BudgetLimit": { "Amount": "10", "Unit": "USD" },
  "TimeUnit": "MONTHLY",
  "BudgetType": "COST"
}

// Create it, alerting at 80% of forecast spend:
// aws budgets create-budget --account-id 123456789012 \
//   --budget file://budget.json \
//   --notifications-with-subscribers file://notifications.json

When to use it

  • A startup sets a $500 monthly budget with alerts at 80% and 100% thresholds so the CTO is emailed before unexpected costs exceed the runway plan.
  • A developer creates a per-service budget for EC2 at $200/month to catch runaway instances early, separate from the account-level budget.
  • A company uses AWS Budgets Actions to automatically apply a restrictive IAM policy when spending crosses 90% of the monthly limit, preventing further resource creation.

More examples

Create a Monthly Cost Budget

Creates a $500 monthly budget with an email alert at 80% usage, giving early warning before costs become a problem.

Example · bash
aws budgets create-budget \
  --account-id 123456789012 \
  --budget '{
    "BudgetName": "monthly-total",
    "BudgetLimit": {"Amount": "500", "Unit": "USD"},
    "TimeUnit": "MONTHLY",
    "BudgetType": "COST"
  }' \
  --notifications-with-subscribers '[{
    "Notification": {"NotificationType": "ACTUAL",
      "ComparisonOperator": "GREATER_THAN", "Threshold": 80},
    "Subscribers": [{"SubscriptionType": "EMAIL",
      "Address": "[email protected]"}]
  }]'

List All Active Budgets

Lists all budgets in the account with their spending limit and current actual spend for a quick status overview.

Example · bash
aws budgets describe-budgets \
  --account-id 123456789012 \
  --query 'Budgets[].{Name:BudgetName,Limit:BudgetLimit.Amount,Spent:CalculatedSpend.ActualSpend.Amount}' \
  --output table

Add Forecast Alert to Budget

Adds a forecasted-spend alert that emails you when AWS predicts your final monthly bill will exceed the budget.

Example · bash
aws budgets create-notification \
  --account-id 123456789012 \
  --budget-name monthly-total \
  --notification '{
    "NotificationType": "FORECASTED",
    "ComparisonOperator": "GREATER_THAN",
    "Threshold": 100
  }' \
  --subscribers '[{"SubscriptionType": "EMAIL", "Address": "[email protected]"}]'

Discussion

  • Be the first to comment on this lesson.