We run workloads on all three big clouds: the product on AWS, analytics on Google Cloud, and a group of internal tools on Azure because the company signs in with Microsoft. For a long time each cloud had one budget at the account level, sending email to a shared finance inbox. Over a year, that setup caught exactly zero incidents before the invoice did. The alerts arrived, but nobody who could fix the cause read them.

This post describes what replaced it. It builds on two earlier posts: why an AWS budget alert can fire too late (post 172) and why cost allocation tags do not appear in Cost Explorer until you activate them (post 171). Here we cover the full guardrail set across the three clouds.

Three facts to design around

  1. Budgets are alerts, not limits. None of the three clouds stops spending when a budget is exceeded by default. You either automate an action or a person acts.

  2. Billing data is delayed. Cost data is refreshed periodically, often several times a day, and some services report later than others. A budget can only fire after the data arrives.

  3. An alert without an owner is noise. If the alert lands in a shared inbox, it is ignored within weeks.

So the setup has four layers: owners, budgets, anomaly detection and a small number of automated actions.

Layer 1: owners through tags and labels

Every resource needs a team owner that billing tools can group by.

Cloud

Mechanism

Gotcha

AWS

Cost allocation tags (user-defined tags activated in Billing)

Tags count only from activation onward; activate them early

Google Cloud

Labels on resources, exported in the billing export

Not every resource supports labels; projects are often the cleaner owner boundary

Azure

Tags on resources and resource groups

Tags are not inherited by default; enable tag inheritance in Cost Management

We standardised on two keys everywhere: team and env. Enforcement is in policy, not wiki:

  • AWS: a tag policy in AWS Organizations defines allowed values, and an SCP denies creating key resources (EC2 instances, RDS instances) without the team tag.

  • Google Cloud: one project per team and environment, so the project itself is the owner. An organization policy custom constraint requires labels where supported.

  • Azure: an Azure Policy assignment with the "Require a tag on resource groups" built-in definition, plus "Inherit a tag from the resource group" with the modify effect.

Layer 2: budgets at the level someone can act on

One budget at account level is useless for a team. We create budgets per team and environment, with forecast-based thresholds so alerts arrive before the money is spent.

AWS Budgets

aws budgets create-budget --account-id 111122223333 \
  --budget '{
    "BudgetName": "team-payments-prod-monthly",
    "BudgetLimit": {"Amount": "4000", "Unit": "USD"},
    "TimeUnit": "MONTHLY",
    "BudgetType": "COST",
    "CostFilters": {"TagKeyValue": ["user:team$payments"]}
  }' \
  --notifications-with-subscribers '[
    {"Notification": {"NotificationType": "FORECASTED", "ComparisonOperator": "GREATER_THAN",
                      "Threshold": 100, "ThresholdType": "PERCENTAGE"},
     "Subscribers": [{"SubscriptionType": "SNS",
                      "Address": "arn:aws:sns:us-east-1:111122223333:cost-alerts-payments"}]},
    {"Notification": {"NotificationType": "ACTUAL", "ComparisonOperator": "GREATER_THAN",
                      "Threshold": 80, "ThresholdType": "PERCENTAGE"},
     "Subscribers": [{"SubscriptionType": "SNS",
                      "Address": "arn:aws:sns:us-east-1:111122223333:cost-alerts-payments"}]}
  ]'

The SNS topic feeds the team's chat channel through AWS Chatbot (now part of Amazon Q Developer in chat applications). Its access policy must allow budgets.amazonaws.com to publish.

Google Cloud budgets

Budgets are set on the billing account and can be scoped to projects, services or labels. Besides email, a budget can publish to a Pub/Sub topic. The message includes the cost so far and the budget amount, so a small function can route or act on it.

gcloud billing budgets create \
  --billing-account=012345-6789AB-CDEF01 \
  --display-name="analytics-prod-monthly" \
  --budget-amount=6000USD \
  --filter-projects=projects/acme-analytics-prod \
  --threshold-rule=percent=0.8 \
  --threshold-rule=percent=1.0,basis=forecasted-spend \
  --notifications-rule-pubsub-topic=projects/acme-finops/topics/budget-events

Pub/Sub notifications are sent several times a day even when no threshold is crossed, so the consumer must compare values instead of treating every message as an alert.

Azure budgets

Azure budgets live at a scope (subscription, resource group, management group) and can trigger an action group, which can post to Teams via a webhook, call a Logic App or run an Automation runbook. We create one per resource group of each team, with forecasted and actual thresholds, through Bicep alongside the resource group itself, so a new team gets its budget on day one.

Layer 3: anomaly detection for the spikes budgets miss

A monthly budget only reacts when the total grows enough. A new service that quietly costs an extra 150 USD a day can hide inside a large budget for two weeks. Anomaly detection compares spend with its own history and flags unusual jumps.

Cloud

Feature

How we route it

AWS

Cost Anomaly Detection: monitors per service, linked account, cost category or cost allocation tag

Alert subscription per team tag, immediate alerts to SNS

Google Cloud

Cost anomaly detection in Cloud Billing, on by default for billing accounts

Anomaly notifications to the billing account's recipients, reviewed in the anomalies page

Azure

Cost anomaly alerts in Cost Management, at subscription scope

Anomaly alert rule per subscription, email to the owning team

Two lessons from tuning:

  • Monitor by owner dimension. On AWS we use a cost allocation tag monitor on team, so an anomaly already names the team. A single "all services" monitor produces anomalies that nobody feels responsible for.

  • Set an impact threshold. We alert only when the anomaly's total impact exceeds both an absolute value (50 USD) and a percentage (20 percent). Below that, noise wins.

Layer 4: automated actions, used sparingly

Automation that stops resources can cause an outage that costs more than the overspend. We automate only where stopping is safe:

  • Sandbox and dev accounts on AWS: a budget action applies an IAM policy that denies creating new EC2 and SageMaker resources once actual spend reaches 100 percent. Existing resources keep running; nothing is deleted.

  • Google Cloud sandboxes: the Pub/Sub consumer can detach the billing account from a sandbox project when spend exceeds a hard cap. Google documents this pattern and warns that it shuts down every service in the project and may delete resources, so we only use it on throwaway projects with the label sandbox=true.

  • Azure dev subscriptions: an action group runs a runbook that deallocates VMs tagged autostop=true.

Production never gets automatic shutdown. There, the guardrail is a page to the on-call engineer of the owning team for anomalies above 500 USD per day.

A weekly review that takes ten minutes

Alerts catch spikes; slow drift needs a human. Every Monday each team looks at one view: last week's spend by service versus the previous four weeks, from AWS Cost Explorer, the Google Cloud billing export in BigQuery, and Azure Cost analysis. Any line that grew more than 15 percent gets a sentence in the team channel: expected (new feature, more traffic) or not (investigate).

Common mistakes

Mistake

Why it hurts

Do this instead

One budget for the whole account

Nobody owns the alert

Budgets per team and environment

Only actual-spend thresholds

Alert arrives after the money is gone

Add forecasted thresholds

Alerts to a shared finance inbox

Ignored within weeks

Route to the owning team's channel

Auto-shutdown in production

Cost incident becomes an outage

Page a human for production

Tagging policy without enforcement

Untagged spend grows silently

Deny or require tags through policy

Key takeaways

  • Budgets alert; they do not cap spend unless you automate an action.

  • Owners first: tags, labels or projects that map spend to a team.

  • Combine forecasted budgets with anomaly detection to catch both drift and spikes.

  • Automate only safe actions in non-production environments.

  • A short weekly review catches what alerts miss.

References