Cost Explorer, budgets and tagging

Intermediate · 19 min

Seeing and controlling AWS spend: Cost Explorer, cost allocation tags, cost categories, Budgets and actions, anomaly detection and common waste.

Before thisCreating an account and securing the root userOrganizations, SCPs and multi-account setupsEC2 pricing, Spot and Savings PlansCloudFormation templates and stacks

AWS Events · 30 min · from 11:01

Cost Explorer, budgets and tagging

The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.

Taught by AWS EventsReport a problem with this video
Not started
Set this lesson's status

What you'll learn

  • Accounts are the cleanest cost boundary. Tags divide spend inside and across them.
  • A tag appears in cost data only after it is activated as a cost allocation tag. Apply tags from the start, through code.
  • Cost Explorer shows where money goes. Group by service, account, tag and usage type to find the cause.
  • Budgets warn on actual or forecast spend, but billing data lags by hours, so a budget is not a hard cap.
  • Budget actions and anomaly detection shorten the time between a mistake and someone acting on it.
  • Remove idle and oversized resources before buying commitments for what remains.

The bill is an engineering output

In a data centre, spending needs a purchase order. On AWS, a loop in a script or a forgotten cluster spends money with nobody signing anything. Cost needs the same treatment as latency: measured, attributed to an owner and watched. The broader practice is FinOps.

Think of a shared house with one electricity meter. Arguments end only when each room gets its own meter and someone looks at them before the quarterly bill.

Attribution first

Separate accounts under Organizations are the cleanest split: consolidated billing shows each account’s spend with no tagging at all.

Tags divide further. Agree a few keys, such as team, service and environment, and apply them from your infrastructure code. Then activate each key as a cost allocation tag, which only the management account (or a standalone account) can do. A new tag can take up to 24 hours to appear. A backfill can reach up to 12 months, but only where the tag was already on the resource.

Tag policies standardise keys and values across accounts, and IAM or SCP conditions can require tags at creation. Cost categories group spend by rules without retagging, which helps with shared and untaggable costs.

Looking

Cost Explorer charts cost and usage, filtered and grouped. When a bill jumps, narrow in steps: which service, which account, which usage type, which day. “EC2-Other went up” becomes “NAT data processing in one account since the 12th”. The console is free; the API costs $0.01 per paginated request, as of November 2026. You can’t disable Cost Explorer once enabled.

{"TimePeriod": {"Start": "2026-10-01", "End": "2026-11-01"},
 "Granularity": "MONTHLY", "Metrics": ["UnblendedCost"],
 "GroupBy": [{"Type": "TAG", "Key": "team"},
             {"Type": "DIMENSION", "Key": "SERVICE"}]}

For line-item detail, Data Exports delivers the Cost and Usage Report 2.0 to S3, to query with SQL.

Warning

A budget tracks cost, usage or commitment coverage and notifies on actual or forecast values:

MonthlyCost:
  Type: AWS::Budgets::Budget
  Properties:
    Budget:
      BudgetName: shop-prod-monthly
      BudgetType: COST
      TimeUnit: MONTHLY
      BudgetLimit: {Amount: 500, Unit: USD}
    NotificationsWithSubscribers:
      - Notification: {NotificationType: FORECASTED,
          ComparisonOperator: GREATER_THAN, Threshold: 100}
        Subscribers:
          - {SubscriptionType: EMAIL, Address: team@example.com}

Budget data updates up to three times a day, so it is a smoke alarm, not a circuit breaker. Budget actions can apply an IAM policy or SCP, or stop targeted EC2 or RDS instances, automatically or after approval. Cost Anomaly Detection catches unusual patterns you didn’t set a threshold for.

New accounts choose a free or paid plan, with $100 in credits and up to $100 more for completing activities; the free plan ends after six months or when credits run out. Older advice about twelve months of free usage describes the previous scheme.

Reducing

In order of usual payoff:

  1. Delete what’s idle: unattached volumes, old snapshots, unused load balancers and addresses, forgotten environments.
  2. Rightsize from measurements. Cost Optimization Hub gathers recommendations.
  3. Schedule non-production to sleep; set retention on logs, images and backups.
  4. Fix architecture: data transfer, NAT traffic, storage class.
  5. Then commit, with Savings Plans, and use Spot where interruption is fine.

Give each team its own numbers. A monthly review with owners beats any dashboard nobody opens.

Charges people don’t expect

Some costs have no resource you would think to look at. Data moving between Availability Zones or Regions is charged. So is data processed by NAT gateways and load balancers, and public IPv4 addresses. Logs are charged when ingested and again while stored. Cross-Region backup copies, provisioned capacity that sits idle and extended support for old database or Kubernetes versions also appear quietly. When you estimate a design, follow one request through it and ask what is metered at each hop.

About the video

The embed is a clip (11:01 to 40:47) of AWS re:Invent 2024’s “Best practices and new tools for cost reporting and estimation”. Its chapters in that range cover monitoring and visibility, analysing cost and idle usage, AI for cost, KPIs and dashboards, showback and chargeback, and managing tags and categories. I judged it from chapters and description only, since transcripts couldn’t be fetched. English was judged from its English caption track and title. A 2020 session on allocation is in deeper.

What was run: cfn-lint passed a template containing this budget with an extra actual-spend alert, and the Cost Explorer request was validated against the SDK’s request model without being sent. No billing data exists here. Behaviour and prices are from the AWS docs, checked 2026-11-29.

Where this fits

This is the last lesson of the roadmap. Cost belongs beside security and reliability in every design review, as the Well-Architected Framework puts it.

Check yourself

  1. 01You tagged every resource with team last week, but Cost Explorer cannot group by it. Why?

    The key has to be activated as a cost allocation tag, in the management account if you use Organizations, and activation and appearance each take time. Older data needs a backfill, which can only show values that were on the resources then.

  2. 02You set a $100 budget and the bill reached $400. How is that possible?

    A budget alerts, it does not stop spending by default, and its data is refreshed only a few times a day. Usage can run far past the threshold before the alert arrives.

  3. 03The largest unexplained line is NAT gateway data processing. What do you look for?

    Traffic that need not pass through NAT, such as S3 and DynamoDB access that a gateway endpoint would carry, image pulls from private subnets, and chatty traffic to AWS APIs. Flow logs show the top talkers.

  4. 04Why rightsize before buying a Savings Plan?

    A commitment locks in a level of spend. If you commit while oversized, you pay for the waste for the whole term.

Go deeper

Notes

Private to you

Esc
↑↓ navigate↵ open? shortcuts

Keyboard shortcuts

Press Esc to close

Anywhere

⌘K
Search and commands
/
Search
?
This sheet
Esc
Close

Reading a lesson

J
Next lesson
K
Previous lesson
B
Bookmark