AWS Cost Explorer & Budgets
Key concepts
Cost Explorer reports
Rightsizing recommendations
Reserved Instance coverage
AWS Budgets alerts
Cost allocation tags
Overview
AWS Cost Explorer and AWS Budgets are the primary tools for understanding, analyzing, and controlling AWS costs. Cost Explorer provides visualization and analysis of your spending patterns, while AWS Budgets allows you to set custom cost and usage thresholds with automated alerts and actions. Together, they form the foundation of AWS cost governance for the SAA-C03 exam.
Core Concept
AWS Cost Explorer analyzes historical spend (up to 12 months) and forecasts future costs (up to 12 months). AWS Budgets sets thresholds and triggers alerts/actions when actual or forecasted costs exceed limits. Cost Explorer provides rightsizing recommendations and Reserved Instance/Savings Plans reports to identify optimization opportunities. Use cost allocation tags to track spending by project, team, or environment.
When exam questions mention 'analyze spending patterns', 'visualize costs', or 'forecast future costs', the answer is Cost Explorer. When questions mention 'alert when costs exceed', 'automate cost controls', or 'prevent budget overruns', the answer is AWS Budgets. Questions about 'track costs by project or department' require cost allocation tags.
Key Concepts
AWS Cost Explorer

Cost Explorer Reports and Features
Default Reports | Report Type | Purpose | |-------------|---------| | Monthly costs by service | See which services drive spending | | Monthly costs by linked account | Track costs across accounts in Organizations | | Daily costs | Identify spending anomalies | | Monthly EC2 running hours costs | Analyze compute usage patterns |
Key Features:
- View costs and usage for last 12 months
- Forecast costs up to 12 months ahead
- Filter by service, region, tag, account, and more
- Group costs by multiple dimensions
- Save custom reports for reuse
- Export data to CSV for external analysis
- API access for programmatic analysis
Granularity Options:
- Monthly (default, fastest)
- Daily (more detail, larger datasets)
- Hourly (requires hourly granularity enabled, additional cost)
Free Tier: Cost Explorer is free to use; API calls cost $0.01 per request
Rightsizing Recommendations
EC2 Rightsizing Recommendations
How It Works:
- Analyzes 14 days of CloudWatch metrics (CPU, memory, network)
- Identifies underutilized or idle EC2 instances
- Recommends smaller instance types or termination
- Shows estimated monthly savings
Recommendation Types: | Type | Criteria | Action | |------|----------|--------| | Modify | Low utilization (<40% CPU typical) | Resize to smaller instance | | Terminate | Very low/no utilization | Shut down instance |
Key Metrics Analyzed:
- CPU utilization
- Memory utilization (requires CloudWatch agent)
- Network I/O
- Disk I/O
Limitations:
- EC2 instances only (not RDS, ECS, etc.)
- 14-day minimum history required
- Memory metrics require CloudWatch agent
- Recommendations are suggestions, not automated
Best Practice: Review recommendations weekly and implement during maintenance windows
Reserved Instance Reports
RI Coverage and Utilization Reports
RI Coverage Report
- Shows percentage of running instance hours covered by RIs
- Identifies On-Demand usage that could be converted to RIs
- Calculates potential savings from increased RI coverage
- Filter by service, region, instance type
Coverage Calculation:
RI Coverage = Reserved Instance Hours / Total Running Hours x 100%
Example:
- Total running hours: 10,000
- RI covered hours: 7,500
- Coverage: 75%
- Opportunity: 25% could be covered by RIs
RI Utilization Report
- Shows percentage of purchased RI hours actually used
- Identifies unused RI capacity (wasted money)
- Helps right-size future RI purchases
Utilization Calculation:
RI Utilization = Used RI Hours / Purchased RI Hours x 100%
Example:
- Purchased RI hours: 10,000
- Actually used: 8,500
- Utilization: 85%
- Waste: 15% of RI cost unused
Target Benchmarks:
- Coverage: Aim for 70-80% for predictable workloads
- Utilization: Aim for 95%+ to minimize waste
Savings Plans Reports
Savings Plans Coverage and Utilization
Savings Plans Coverage Report
- Shows percentage of compute spend covered by Savings Plans
- Identifies On-Demand spend that could benefit from Savings Plans
- Includes EC2, Lambda, and Fargate usage
Savings Plans Utilization Report
- Shows how much of your Savings Plans commitment is being used
- Identifies over-purchased or under-utilized Savings Plans
- Helps optimize future purchases
Key Difference from RIs:
- Savings Plans measure dollars committed vs. used
- RIs measure instance hours reserved vs. used
- Savings Plans apply automatically to best savings opportunity
Purchase Recommendations:
- Cost Explorer provides Savings Plans purchase recommendations
- Based on historical usage patterns
- Shows estimated savings for different commitment levels
- Recommends optimal term (1-year vs 3-year) and payment option
AWS Budgets
AWS Budgets Types and Alerts
Budget Types | Budget Type | Purpose | Use Case | |-------------|---------|----------| | Cost Budget | Track dollar spend | "Alert if monthly spend exceeds $1000" | | Usage Budget | Track service usage | "Alert if EC2 hours exceed 1000" | | Reservation Budget | Track RI/SP coverage/utilization | "Alert if RI utilization drops below 80%" | | Savings Plans Budget | Track Savings Plans utilization | "Alert if SP utilization drops below 90%" |
Alert Thresholds
- Actual cost/usage thresholds (when you've already spent)
- Forecasted cost/usage thresholds (when you're predicted to spend)
- Multiple thresholds per budget (e.g., 50%, 80%, 100%)
Notification Options:
- Email (up to 10 recipients per alert)
- Amazon SNS topics (for integration with other systems)
- AWS Chatbot (Slack, Microsoft Teams)
Pricing:
- First 2 budgets per month: FREE
- Additional budgets: $0.02/day per budget ($0.62/month)
- Budget actions and Budget Reports have additional costs
AWS Budget Actions
Automated Budget Actions
Available Actions | Action Type | Effect | Use Case | |-------------|--------|----------| | IAM Policy | Apply deny policy to users/roles | Prevent new resource creation | | SCP Policy | Apply deny policy at OU/account level | Organization-wide enforcement | | Stop EC2 Instances | Stop specific EC2 instances | Reduce compute costs | | Stop RDS Instances | Stop specific RDS instances | Reduce database costs |
Action Execution Options:
- Run automatically when threshold breached
- Require manual approval (workflow)
IAM Policy Action Example: Attach a deny policy that prevents:
- Launching new EC2 instances
- Creating new resources
- Starting stopped instances
Best Practice: Start with manual approval, then automate once confident in thresholds
Important: Actions require IAM role with appropriate permissions
Cost Allocation Tags
Cost Allocation Tags
Tag Types
| Type | Source | Activation |
|------|--------|------------|
| AWS-generated tags | Created by AWS (e.g., aws:createdBy) | Activate in Billing Console |
| User-defined tags | Created by you | Must be activated for cost allocation |
Common Tagging Strategies | Tag Key | Example Values | Purpose | |---------|---------------|---------| | Environment | prod, dev, test, staging | Track costs by environment | | Project | project-alpha, website-v2 | Allocate to projects | | CostCenter | CC-001, engineering-team | Chargeback/showback | | Owner | john.doe, ops-team | Accountability | | Application | inventory-app, payment-service | Application costs |
Tag Activation Process:
- Create tags on resources (via console, CLI, or IaC)
- Go to Billing Console > Cost Allocation Tags
- Select tags to activate
- Wait up to 24 hours for activation
- Tags appear in Cost Explorer after activation
Key Points:
- Tags must be activated before they appear in Cost Explorer
- Historical data NOT retroactively tagged
- Up to 500 user-defined tags per account
- Tags are case-sensitive
Cost-Benefit Analysis
Cost Management Tools Comparison
| Feature | Cost Explorer | AWS Budgets | Cost and Usage Reports |
|---|---|---|---|
| Primary Purpose | Analyze and visualize costs | Set thresholds and alerts | Detailed billing data export |
| Historical Data | 12 months | N/A (forward-looking) | Unlimited (S3 storage) |
| Forecasting | Up to 12 months | Forecasted alerts only | No |
| Alerts | No | Yes (email, SNS, Chatbot) | No (use Budgets) |
| Automated Actions | No | Yes (IAM, SCP, Stop instances) | No |
| Cost | Free (API: $0.01/request) | 2 free, then $0.62/month | Free (plus S3 storage) |
| Best For | Analysis and planning | Governance and control | Detailed audit and chargeback |
When to Use Each Tool
Decision Framework
Cost Management Decision Guide
| Scenario | Use Cost Explorer | Use AWS Budgets | Use CUR |
|---|---|---|---|
| Analyze last month spending | Yes - view reports | No | For detailed line items |
| Predict next quarter costs | Yes - forecasting | No | No |
| Alert when spend exceeds $500 | No | Yes - cost budget | No |
| Stop instances at budget limit | No | Yes - budget actions | No |
| Track costs by project | Yes - with tags | Yes - with tags | Yes - detailed breakdown |
| Identify underused EC2 | Yes - rightsizing | No | No |
| RI purchase recommendation | Yes - RI reports | No | No |
| Detailed hourly billing | Limited | No | Yes - full detail |
| Chargeback to departments | Yes - basic | No | Yes - detailed |
CLI Commands
# Get cost and usage for last month
aws ce get-cost-and-usage \
--time-period Start=2024-01-01,End=2024-01-31 \
--granularity MONTHLY \
--metrics "BlendedCost" "UnblendedCost" \
--group-by Type=DIMENSION,Key=SERVICE
# Get cost forecast for next 3 months
aws ce get-cost-forecast \
--time-period Start=2024-02-01,End=2024-04-30 \
--granularity MONTHLY \
--metric UNBLENDED_COST
# Get costs filtered by tag
aws ce get-cost-and-usage \
--time-period Start=2024-01-01,End=2024-01-31 \
--granularity MONTHLY \
--metrics "BlendedCost" \
--filter '{"Tags":{"Key":"Environment","Values":["production"]}}'# Get EC2 rightsizing recommendations
aws ce get-rightsizing-recommendation \
--service AmazonEC2 \
--configuration '{"RecommendationTarget":"SAME_INSTANCE_FAMILY","BenefitsConsidered":true}'
# Get recommendations with estimated savings
aws ce get-rightsizing-recommendation \
--service AmazonEC2 \
--page-size 100
# Filter recommendations by tag
aws ce get-rightsizing-recommendation \
--service AmazonEC2 \
--filter '{"Tags":{"Key":"Environment","Values":["development"]}}'# Get RI coverage
aws ce get-reservation-coverage \
--time-period Start=2024-01-01,End=2024-01-31 \
--granularity MONTHLY
# Get RI utilization
aws ce get-reservation-utilization \
--time-period Start=2024-01-01,End=2024-01-31 \
--granularity MONTHLY
# Get Savings Plans coverage
aws ce get-savings-plans-coverage \
--time-period Start=2024-01-01,End=2024-01-31
# Get Savings Plans utilization
aws ce get-savings-plans-utilization \
--time-period Start=2024-01-01,End=2024-01-31
# Get Savings Plans purchase recommendations
aws ce get-savings-plans-purchase-recommendation \
--savings-plans-type COMPUTE_SP \
--term-in-years ONE_YEAR \
--payment-option NO_UPFRONT \
--lookback-period-in-days SIXTY_DAYS# Create a cost budget with alert
aws budgets create-budget \
--account-id 123456789012 \
--budget '{
"BudgetName": "Monthly-Cost-Budget",
"BudgetLimit": {"Amount": "1000", "Unit": "USD"},
"BudgetType": "COST",
"TimeUnit": "MONTHLY",
"CostFilters": {}
}' \
--notifications-with-subscribers '[{
"Notification": {
"NotificationType": "ACTUAL",
"ComparisonOperator": "GREATER_THAN",
"Threshold": 80,
"ThresholdType": "PERCENTAGE"
},
"Subscribers": [{
"SubscriptionType": "EMAIL",
"Address": "alerts@company.com"
}]
}]'
# Create budget with SNS notification
aws budgets create-budget \
--account-id 123456789012 \
--budget '{
"BudgetName": "EC2-Usage-Budget",
"BudgetLimit": {"Amount": "1000", "Unit": "HOURS"},
"BudgetType": "USAGE",
"TimeUnit": "MONTHLY",
"UsageType": "EC2:Hours"
}' \
--notifications-with-subscribers '[{
"Notification": {
"NotificationType": "FORECASTED",
"ComparisonOperator": "GREATER_THAN",
"Threshold": 100,
"ThresholdType": "PERCENTAGE"
},
"Subscribers": [{
"SubscriptionType": "SNS",
"Address": "arn:aws:sns:us-east-1:123456789012:budget-alerts"
}]
}]'
# List all budgets
aws budgets describe-budgets --account-id 123456789012
# Delete a budget
aws budgets delete-budget \
--account-id 123456789012 \
--budget-name "Monthly-Cost-Budget"# Tag an EC2 instance for cost allocation
aws ec2 create-tags \
--resources i-1234567890abcdef0 \
--tags Key=Environment,Value=production Key=Project,Value=web-app
# Tag multiple resources
aws ec2 create-tags \
--resources i-111111 i-222222 vol-333333 \
--tags Key=CostCenter,Value=CC-001
# Get resources by tag
aws resourcegroupstaggingapi get-resources \
--tag-filters Key=Environment,Values=production
# List activated cost allocation tags (via Cost Explorer)
# Note: Tag activation is done in Billing Console, not CLI
aws ce list-cost-allocation-tags \
--status ActiveReal-World Cost Scenarios
Scenario 1: Startup Cost Governance
Setup: Startup wants to avoid surprise bills
- Monthly budget: $5,000
- Multiple development teams
- No prior AWS experience
Solution:
1. Enable Cost Explorer (free)
2. Create cost budget: $5,000/month
3. Set alert thresholds:
- 50% actual: informational
- 80% actual: warning
- 100% forecasted: critical
4. Add budget action: Apply IAM deny policy at 90%
5. Implement tagging: Team, Environment, Project
6. Weekly Cost Explorer review meetings
Result: Proactive cost control and team accountability
Scenario 2: Enterprise Chargeback
Setup: Large enterprise needs department chargeback
- 50+ AWS accounts in Organizations
- Finance requires monthly cost reports by department
- Need to track project-level costs
Solution:
1. Implement mandatory tagging policy:
- Department (required)
- Project (required)
- Owner (required)
2. Create SCPs to enforce tag compliance
3. Activate tags for cost allocation
4. Use Cost Explorer with tag grouping
5. Export Cost and Usage Reports to S3
6. Build BI dashboards for finance team
Result: Accurate cost attribution and department accountability
Scenario 3: RI Optimization
Setup: Company with 70% On-Demand EC2 spend
- Stable production workloads
- Underutilized existing RIs
- No visibility into RI performance
Solution:
1. Review RI Utilization Report in Cost Explorer
- Current utilization: 65% (waste identified)
2. Review RI Coverage Report
- Current coverage: 30% (opportunity identified)
3. Get RI/Savings Plans recommendations
4. Purchase Savings Plans for additional coverage
5. Set RI Utilization Budget: alert if <80%
6. Monthly review of coverage and utilization
Result:
- RI utilization improved from 65% to 92%
- Coverage increased from 30% to 75%
- 40% reduction in compute costs
Common Pitfalls
Not Activating Cost Allocation Tags
The Mistake: Creating tags on resources but forgetting to activate them in the Billing Console.
The Impact: Tags don't appear in Cost Explorer, making cost tracking by project/team impossible.
The Fix: After creating tags, go to Billing Console > Cost Allocation Tags > Select tags > Activate. Wait 24 hours for data to appear. Note: Historical data will NOT be retroactively tagged.
Setting Only Actual Cost Alerts (Not Forecasted)
The Mistake: Only setting alerts for actual spend, missing forecasted overspend.
The Impact: By the time actual spend triggers the alert, it's too late to prevent the overage.
The Fix: Always set both ACTUAL and FORECASTED thresholds. Set forecasted alert at 100% and actual alerts at 50%, 80%, 100%. This gives early warning before costs are incurred.
Over-Relying on Rightsizing Recommendations Without Context
The Mistake: Blindly implementing all rightsizing recommendations without understanding workload patterns.
The Impact: Downsizing instances that need burst capacity causes performance issues.
The Fix: Review recommendations with application owners. Check if workloads have periodic spikes (monthly batch jobs, end-of-quarter processing). Consider rightsizing for average usage PLUS headroom, not just minimum observed usage.
Purchasing RIs Based on Coverage Alone
The Mistake: Purchasing Reserved Instances to increase coverage without checking utilization first.
The Impact: Buying more RIs when existing ones are underutilized, wasting money on unused capacity.
The Fix: Always check RI Utilization Report BEFORE purchasing more RIs. Target 95%+ utilization on existing RIs first. If utilization is low, investigate why (workload changes, right-sizing opportunities) before buying more.
Not Using Budget Actions for Automated Governance
The Mistake: Setting budget alerts but relying solely on manual intervention to control costs.
The Impact: Alert fatigue or missed alerts lead to budget overruns without action.
The Fix: Implement Budget Actions to automatically apply IAM deny policies or stop non-critical resources when thresholds are breached. Start with manual approval workflow, then automate once confident in thresholds. Ensure development/test environments have automated cost controls.
Exam Scenarios
Scenario-Based Questions
| Scenario | Best Solution | Key Rationale |
|---|---|---|
| Company wants to analyze last 6 months of spending by service | Cost Explorer with service grouping | Cost Explorer provides 12 months historical data with filtering |
| Alert finance team when monthly spend exceeds budget | AWS Budgets with cost budget | Budgets provide threshold alerts with email/SNS |
| Identify EC2 instances that should be resized | Cost Explorer Rightsizing Recommendations | Analyzes CloudWatch metrics to recommend optimal sizes |
| Automatically stop dev instances when budget exceeded | AWS Budgets with Budget Actions | Budget Actions can stop EC2/RDS instances |
| Track costs by project across multiple accounts | Cost allocation tags + Cost Explorer | Tags enable cost tracking by any dimension |
| Forecast next quarter AWS costs for budget planning | Cost Explorer cost forecast | Forecasts up to 12 months based on historical patterns |
| Measure RI utilization to optimize purchases | Cost Explorer RI Utilization Report | Shows percentage of purchased RI hours used |
| Prevent any resource creation when over budget | AWS Budgets with IAM/SCP action | Deny policies block new resource creation |
Cost Optimization Question Patterns
- "Analyze spending" + "by service/account/region" = Cost Explorer with grouping
- "Alert when exceeds" = AWS Budgets with cost budget
- "Forecast costs" = Cost Explorer forecasting
- "Track by project/team/department" = Cost allocation tags
- "Right-size instances" = Cost Explorer Rightsizing Recommendations
- "RI performance" = RI Coverage and Utilization Reports
- "Prevent overspending automatically" = Budget Actions
- "Savings Plans recommendations" = Cost Explorer Savings Plans reports
Test Your Knowledge
A company wants to track AWS costs by department for chargeback purposes. They have already created tags on all resources. What additional step is required before costs appear in Cost Explorer by department?
A Solutions Architect needs to automatically prevent new EC2 instances from being launched when monthly costs exceed $10,000. Which solution meets this requirement?
A company's Reserved Instance utilization is at 60%, but coverage is only 25%. What should they do FIRST before purchasing additional RIs?
A startup wants to forecast their AWS costs for the next 6 months for budget planning. They have 3 months of usage history. Which service provides this capability?
Related Services
Quick Reference
Cost Explorer Key Features
| Feature | Purpose | Data Range |
|---|---|---|
| Cost & Usage Reports | Analyze spending patterns | 12 months historical |
| Cost Forecast | Predict future costs | Up to 12 months ahead |
| Rightsizing | Identify oversized EC2 | 14 days minimum |
| RI Coverage | Track RI coverage percentage | Customizable |
| RI Utilization | Track RI usage percentage | Customizable |
| Savings Plans Reports | Coverage and utilization | Customizable |
AWS Budgets Key Features
| Budget Type | Threshold Types | Actions Available |
|---|---|---|
| Cost Budget | Actual, Forecasted | IAM policy, SCP, Stop EC2/RDS |
| Usage Budget | Actual, Forecasted | IAM policy, SCP, Stop EC2/RDS |
| RI Budget | Coverage, Utilization | IAM policy, SCP |
| Savings Plans Budget | Coverage, Utilization | IAM policy, SCP |
Cost Allocation Tag Best Practices
| Tag Key | Description | Example Values |
|---|---|---|
| Environment | Deployment environment | prod, dev, test, staging |
| Project | Project or initiative name | project-x, migration-2024 |
| CostCenter | Financial cost center | CC-001, engineering |
| Owner | Responsible team or person | platform-team, john.doe |
| Application | Application name | inventory-api, web-frontend |
CLI Quick Reference
# Cost Analysis
aws ce get-cost-and-usage \
--time-period Start=YYYY-MM-DD,End=YYYY-MM-DD \
--granularity MONTHLY \
--metrics BlendedCost
# Cost Forecast
aws ce get-cost-forecast \
--time-period Start=YYYY-MM-DD,End=YYYY-MM-DD \
--granularity MONTHLY \
--metric UNBLENDED_COST
# Rightsizing Recommendations
aws ce get-rightsizing-recommendation --service AmazonEC2
# RI Reports
aws ce get-reservation-coverage --time-period Start=YYYY-MM-DD,End=YYYY-MM-DD
aws ce get-reservation-utilization --time-period Start=YYYY-MM-DD,End=YYYY-MM-DD
# Savings Plans Reports
aws ce get-savings-plans-coverage --time-period Start=YYYY-MM-DD,End=YYYY-MM-DD
aws ce get-savings-plans-utilization --time-period Start=YYYY-MM-DD,End=YYYY-MM-DD
# Create Budget with Alert
aws budgets create-budget \
--account-id ACCOUNT_ID \
--budget file://budget.json \
--notifications-with-subscribers file://notifications.json
# List Budgets
aws budgets describe-budgets --account-id ACCOUNT_ID
Decision Quick Guide
| Question | Answer |
|---|---|
| Need to analyze historical costs? | Cost Explorer (12 months) |
| Need to forecast future costs? | Cost Explorer (up to 12 months) |
| Need alerts when budget exceeded? | AWS Budgets |
| Need to automatically stop resources? | Budget Actions |
| Need to track costs by project? | Cost allocation tags |
| Need to identify oversized EC2? | Rightsizing Recommendations |
| Need to check RI performance? | RI Coverage/Utilization Reports |
| Need detailed billing line items? | Cost and Usage Reports |