Cost management
Seeing, allocating, alerting on and forecasting spend, and choosing database pricing that fits the load. This is Domain 4: Design Cost-Optimized Architectures, 20% of the scored content.
Cost Explorer
AWS Cost Explorer
The interactive view of cost and usage: filter, group, compare periods and forecast. The usual answer to "analyze where the money goes".
Key points
- History and forecast: up to 13 months of history and a forecast for the next 18 months. Data refreshes at least once every 24 hours.
- Analysis: filter and group by service, account, Region, usage type or tag, and download as CSV.
- Recommendations: Reserved Instance purchase recommendations. Savings Plans recommendations, based on past usage, sit in the same Billing and Cost Management console and in the Cost Explorer API.
- Cost: free in the console. The API costs $0.01 per paginated request.
On the exam
"Visualize which service drove last month increase" -> Cost Explorer. "Be warned before overspending" is AWS Budgets, not Cost Explorer.
Budgets
AWS Budgets
Thresholds on cost, usage or commitment metrics, with alerts on actual or forecasted values and optional automatic actions.
Key points
- Types: cost, usage, RI utilization, RI coverage, Savings Plans utilization and Savings Plans coverage.
- Alerts: on actual or forecasted values, to email or an SNS topic, and to chat applications.
- Budget actions: apply an IAM policy or an SCP, or stop specific EC2 or RDS instances, automatically or after approval.
- Not a hard cap: data updates up to 3 times a day, so spend can pass the threshold before the alert arrives.
- Organizations: from the management account an action can apply an SCP to another account, but cannot stop instances in it.
On the exam
"Block new provisioning automatically when the forecast passes 90%" -> budget action with a deny IAM policy or SCP. "Notify when Savings Plans utilization drops below 80%" -> Savings Plans utilization budget.
Anomaly Detection
AWS Cost Anomaly Detection
Machine learning that learns normal spend and alerts on unusual spikes with root cause analysis, without fixed thresholds.
Key points
- Monitors: all AWS services evaluated independently, or specific member accounts, cost allocation tags or cost categories.
- Alerts: individual alerts or aggregated reports, by email or an SNS topic, which can be routed to Slack or Chime.
- Root cause: ranked by dollar impact across service, account, Region and usage type.
- Timing: runs about 3 times a day on net unblended cost and can take up to 24 hours to flag an anomaly. A new service needs 10 days of history.
- Gap: most AWS Marketplace charges are not monitored, use Budgets for those.
On the exam
"Detect unexpected spend spikes without setting thresholds" -> Cost Anomaly Detection. A fixed budget threshold is the distractor.
Data Exports and CUR
AWS Data Exports
The most granular cost data, delivered as files to S3 for Athena, Redshift or Amazon Quick. CUR 2.0 in Data Exports is the current form of the Cost and Usage Report.
Key points
- CUR 2.0: the recommended export, with a fixed schema, nested columns for tags, cost categories, product and discount, and account names.
- SQL customization: choose columns, filter rows and rename them, so the export carries only what you need.
- Other tables: Cost Optimization Hub recommendations, FOCUS 1.0 and 1.2 with AWS columns, and carbon emissions.
- Legacy CUR: still offered as a legacy data export, with a schema that changes with your usage.
- Delivery: ZIP, GZIP or Parquet to an S3 bucket. A pre-built cost and usage dashboard can be deployed to Amazon Quick.
On the exam
"Most detailed line-item cost data, query it with SQL in Athena" -> CUR 2.0 through Data Exports. Cost Explorer is the distractor, it is for interactive analysis, not raw files.
Consolidated billing
Consolidated billing in AWS Organizations
One bill for every account in the organization, paid by the management account, with usage combined for discounts.
Key points
- One bill: the management account pays for all member accounts, at no extra cost.
- Volume discounts: usage is combined across accounts, so tiered prices drop sooner than in standalone accounts.
- RI and Savings Plans sharing: on by default, applied first to the owner account and then to the rest. It can be turned off per account or limited to groups defined with Cost Categories.
- Leaving: an account that leaves the organization loses access to Cost Explorer data from its time in it.
On the exam
"Several accounts, want one invoice and volume discounts" -> AWS Organizations consolidated billing. "Keep one unit RI discount away from other accounts" -> restrict or turn off RI and Savings Plans sharing.
Advisors and estimates
Trusted Advisor, Cost Optimization Hub and AWS Pricing Calculator
Tools that find waste in what runs today and estimate what you plan to run next.
Key points
- Trusted Advisor cost checks: low utilization EC2 instances, idle load balancers, underutilized EBS volumes, unassociated Elastic IPs, idle RDS instances and commitment recommendations.
- Support plan: all checks need Business Support+, Enterprise Support or Unified Operations. Basic only gets service limits and some security and fault tolerance checks.
- Cost Optimization Hub: rightsizing, idle, Savings Plans and RI recommendations across accounts and Regions in one place, with deduplicated savings that reflect your discounts.
- AWS Pricing Calculator: free estimates before you build, shared by link or exported to CSV or PDF. Taxes are not included.
On the exam
"Estimate the monthly cost of a planned migration" -> AWS Pricing Calculator, not Cost Explorer, which only covers what already runs.
Which tool answers which question
| Question | Tool |
|---|---|
| What will this new design cost? | AWS Pricing Calculator. |
| Where did the money go? | Cost Explorer. |
| Warn or act at a limit | AWS Budgets. |
| Alert on an unusual spike | Cost Anomaly Detection. |
| Raw line items for SQL | Data Exports with CUR 2.0. |
| Oversized or idle resources | Compute Optimizer, Cost Optimization Hub, Trusted Advisor. |
| Cost per team or project | Cost allocation tags. |
Database pricing
Amazon DynamoDB, Aurora and RDS pricing models
Database bills follow the capacity model: per request, per provisioned unit, per ACU or per instance hour. Match it to how steady the load is.
Key points
- DynamoDB on-demand: pay per request with no capacity planning, the default and recommended mode for most workloads. An optional maximum throughput caps cost.
- DynamoDB provisioned: pay hourly for RCUs and WCUs whether used or not, with auto scaling (70% target recommended). Reserved capacity saves up to 54% for 1 year or 77% for 3 years.
- DynamoDB switches: provisioned to on-demand up to 4 times in a rolling 24 hours, back at any time. The Standard-IA table class fits tables where storage dominates.
- Aurora Serverless v2: capacity in ACUs. With a minimum of 0 ACUs it pauses after 5 minutes to 1 day idle, with no instance charge while paused. Resuming takes about 15 seconds.
- RDS: Reserved Instances save up to 69% at steady state, with size flexibility for most engines. Database Savings Plans cover RDS, Aurora, DynamoDB and more for up to 35%.
- Backups: automated backup retention from 0 to 35 days (0 disables it). Manual snapshots stay, and keep billing, until you delete them.
On the exam
"New app, unpredictable traffic, no capacity planning" -> DynamoDB on-demand. "Steady, well-known traffic, lowest cost" -> provisioned with auto scaling and reserved capacity. "Dev database idle most of the day" -> Aurora Serverless v2 scaling to 0 ACUs.
Capacity models
| Model | Best fit |
|---|---|
| DynamoDB on-demand | Unknown, spiky or new traffic. Pay per request. |
| DynamoDB provisioned | Steady, predictable traffic with auto scaling, plus reserved capacity for the baseline. |
| Aurora Serverless v2 | Variable or intermittent relational load, and dev or test that can pause at 0 ACUs. |
| RDS or Aurora provisioned | Steady 24/7 relational load, covered by RIs or Savings Plans. |