Cost Explorer, Budgets, and Cost Allocation Tags
Analyse spend trends in Cost Explorer, set budget alerts before you overspend, and tag resources for showback and chargeback reporting.
The Need for Cost Visibility
Without visibility into your AWS spending, cost optimisation is impossible. You cannot improve what you cannot measure. AWS provides three primary tools for cost visibility: Cost Explorer for analysing historical and forecasted spend, AWS Budgets for proactive alerts when spending exceeds thresholds, and Cost Allocation Tags for breaking down costs by team, project, or environment. Together, these tools give you the financial management foundation the Well-Architected Cost Optimisation pillar requires.
# AWS cost management tools:
# Cost Explorer: analyse past spending, forecast
# AWS Budgets: alert when approaching/exceeding limits
# Cost Allocation Tags: attribute costs to teams/projects
# Cost and Usage Report (CUR): granular data to S3 for BI tools
# Billing Dashboard: high-level current month summary
# Savings Plans/RI: analyse commitment coverageCost Explorer: Analysing Spend
AWS Cost Explorer provides a visual interface and API to explore your AWS cost and usage data. You can view spend by service, region, account, resource type, tag, and time period. Cost Explorer also provides 12-month spend forecasts based on historical trends, RI and Savings Plan coverage reports, and cost anomaly detection that uses ML to alert you when spending patterns change unexpectedly. Enable Cost Explorer in the Billing console — it takes 24 hours to populate data.
# Cost Explorer API: get last 30 days spend by service
aws ce get-cost-and-usage \
--time-period Start=2026-05-21,End=2026-06-21 \
--granularity MONTHLY \
--metrics BlendedCost \
--group-by Type=DIMENSION,Key=SERVICE \
--query 'ResultsByTime[0].Groups[].{Service:Keys[0],Cost:Metrics.BlendedCost.Amount}' \
--output table
# Example output:
# Amazon EC2: $8,450
# Amazon RDS: $2,200
# Amazon S3: $430
# AWS Lambda: $85All lessons in this course
- Right-Sizing and Compute Optimizer
- Reserved Instances, Savings Plans, and Spot
- Cost Explorer, Budgets, and Cost Allocation Tags
- S3 and Data Transfer Cost Optimisation