Skip to content

Lab 12 · Cost Management Tools

Cost · Est. time: 20–25 min · Cost: ✅ Free.

Goal. Set up the guardrails from Topic 12 — a Budget with an alert, cost allocation tags, and a tour of Cost Explorer and Trusted Advisor. Do the budget step before any other lab so you get warned about surprise charges.

Do this first

A budget alert is your safety net for all the other (NAT Gateway / ALB / RDS Multi-AZ) labs.


Step 1 — Create a Budget with an email alert

  1. AWS Billing and Cost Management → Budgets → Create budgetCost budget.
  2. Period Monthly, amount e.g. \$5 (or your comfort threshold).
  3. Alert thresholds: add one at 80% of actual and one at 100% of forecasted.
  4. Enter your email. Create. You'll now be emailed if spend approaches/exceeds the limit.
aws budgets create-budget --account-id <acct> \
  --budget '{"BudgetName":"lab-monthly","BudgetLimit":{"Amount":"5","Unit":"USD"},"TimeUnit":"MONTHLY","BudgetType":"COST"}' \
  --notifications-with-subscribers '[{"Notification":{"NotificationType":"FORECASTED","ComparisonOperator":"GREATER_THAN","Threshold":100},"Subscribers":[{"SubscriptionType":"EMAIL","Address":"you@example.com"}]}]'

Point: Budgets is the tool that alerts on actual or forecasted spend — the exam's answer to "email me when spend exceeds/forecast to exceed."


Step 2 — Activate cost allocation tags

  1. Tag some resources with a key like Project (e.g. Project=exam-lab).
  2. Billing → Cost allocation tags → find Project under user-definedActivate.
  3. After a day, you can group Cost Explorer by Project to see cost per project (chargeback).

Point: cost allocation tags attribute spend to teams/projects/environments.


Step 3 — Explore Cost Explorer

  1. Billing → Cost Explorer → Enable (first time; data appears within ~24h).
  2. Group by Service over the last months; switch grouping to your Project tag; view the forecast.

Point: Cost Explorer analyzes and visualizes spend and trends — vs Budgets, which alerts.


Step 4 — Trusted Advisor (recommendations)

  1. Trusted Advisor → review the Cost Optimization checks (idle load balancers, underutilized instances, unassociated Elastic IPs, etc.).
  2. Note: the full check set requires Business/Enterprise Support; Basic support shows a limited subset.

Point: Trusted Advisor gives recommendations across cost, performance, security, fault tolerance, and service limits.


Step 5 — Where the CUR fits (concept)

The Cost and Usage Report (CUR) delivers the most granular billing line items to an S3 bucket, for querying with Athena/Redshift/QuickSight. You don't need to enable it for this lab — just know: "most granular billing data for custom analysis" → CUR, not Cost Explorer.


Teardown

Nothing billable was created. You can keep the Budget — it's free and protects you. Remove the tag/activation only if you want.


✅ What you should understand now

  • Budgets = proactive alerts on actual/forecasted spend (set one before every lab).
  • Cost Explorer = analyze/visualize/forecast spend and trends.
  • Cost allocation tags = attribute cost to team/project (chargeback).
  • Trusted Advisor = recommendations across 5 pillars (full set needs Business/Enterprise Support).
  • CUR = most granular line-item data to S3 for custom analysis.
  • Consolidated billing (Organizations) = one bill + shared volume/RI/SP discounts across accounts.

Related: Learn — Cost Management Tools