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¶
- AWS Billing and Cost Management → Budgets → Create budget → Cost budget.
- Period Monthly, amount e.g. \$5 (or your comfort threshold).
- Alert thresholds: add one at 80% of actual and one at 100% of forecasted.
- 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¶
- Tag some resources with a key like
Project(e.g.Project=exam-lab). - Billing → Cost allocation tags → find
Projectunder user-defined → Activate. - After a day, you can group Cost Explorer by
Projectto see cost per project (chargeback).
Point: cost allocation tags attribute spend to teams/projects/environments.
Step 3 — Explore Cost Explorer¶
- Billing → Cost Explorer → Enable (first time; data appears within ~24h).
- Group by Service over the last months; switch grouping to your
Projecttag; view the forecast.
Point: Cost Explorer analyzes and visualizes spend and trends — vs Budgets, which alerts.
Step 4 — Trusted Advisor (recommendations)¶
- Trusted Advisor → review the Cost Optimization checks (idle load balancers, underutilized instances, unassociated Elastic IPs, etc.).
- 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