Budgets, Cost Explorer, and quotas

Lesson 3 of 4 in Cost and Performance Engineering.

Cost governance is different from cost optimization: optimization shrinks the bill, governance makes sure nobody is surprised by it. The AWS Billing and Cost Management console is the home; inside it, three tools divide the work. AWS Budgets acts before and during the spend: set a budget on cost or usage, alert on actual or forecasted overrun (forecasted is the exam favorite — warned before the money is gone), and attach budget actions that respond automatically, such as applying a restrictive IAM or SCP policy or stopping targeted EC2/RDS instances. Cost Explorer works after the fact: visualize and slice spend by service, account, and — the ML essential — cost allocation tags. Tag every training job, endpoint, and pipeline with team/project tags, activate those tags in the billing console (untagged or unactivated means invisible), and "which team's experiments cost what" becomes a filter instead of a forensic project.

Governance tools — what each one is for, and when it acts
ToolQuestion it answersActs

AWS Budgets

"Will we blow the plan this month?" — alerts + automated actions

Before/during the spend (forecasted alerts)

Cost Explorer

"Where did the money go, by tag/service/account?"

After the spend (analysis + trends)

Cost allocation tags

"Whose endpoint is this?" — attribution keys you must activate

At tagging time; visible in reports once activated

Service Quotas

"How many ml.p-family instances may this account even launch?"

A ceiling checked at request time — raise it before you need it

Service quotas are the ceiling over everything you just planned. SageMaker quotas are fine-grained — per instance type, per resource kind (training jobs vs endpoints) — and Bedrock applies model-level request/token rate quotas; hit one and your training job will not start or your app sees throttles. Two operational consequences: request increases ahead of need (increases go through Service Quotas and are not instant), and treat quotas as a cost guardrail too — a sensible ceiling on accelerator instances means a runaway loop cannot launch a hundred of them.

From spend to signal

  1. Tag every ML resource

    Team/project tags on training jobs, endpoints, pipelines — then activate them as cost allocation tags, or they never appear in a report.

  2. Cost Explorer attributes spend

    Group and filter by activated tag: which team, which project, which experiment — after the fact.

  3. Budget threshold crossed?

    AWS Budgets watches actual and forecasted cost/usage against the plan — forecasted alerts warn early.

  4. SNS alert reaches the owners

    The warning lands before the invoice does — while there is still time to act on it.

  5. Budget action (optional)

    Automated response: apply a restrictive IAM or SCP policy, or stop targeted EC2/RDS instances.

  6. On plan — keep watching
  7. Service Quotas increase

    Usage is trending toward a per-instance-type ceiling — file the increase ahead of need; approvals are not instant.

Interactive checkpoint quiz (2 questions) — open this page in a browser to take it.