Right-Sizing and Reducing Cost with Compute Optimizer and Cost Tools
This lesson explains how AWS Compute Optimizer recommends sizes from measured use, how tags organise resources, and how Cost Explorer, Cost and Usage Reports and Savings Plans show and reduce what they cost.
Learning outcomes
After completing this lesson, you will be able to:
- Interpret Compute Optimizer recommendations.
- Use tags for operations and cost allocation.
- Distinguish Cost Explorer, the CUR and Savings Plans.
- Act on recommendations safely.
AWS Compute Optimizer
AWS Compute Optimizer analyses CloudWatch utilisation data and recommends optimal configurations for EC2 instances, Auto Scaling groups, EBS volumes, Lambda functions, ECS services on Fargate, RDS and Aurora instances and commercial software licences. Each resource is classified as under-provisioned, over-provisioned or optimised, with up to three alternatives, their projected utilisation, performance risk and price. By default it uses 14 days of data; enhanced infrastructure metrics extend the lookback to 93 days for more accurate recommendations on cyclical workloads. Memory utilisation is included only if the CloudWatch agent publishes it. It can be enabled for all accounts of an organisation and preferences such as CPU headroom and preferred instance families can be set.
The following diagram shows the inputs and the three findings.

14days
Default lookback of Compute Optimizer
93days
Lookback with enhanced infrastructure metrics
Compute Optimizer
Tagging for operations and cost
Tags are key-value pairs on resources, such as Environment=prod, Application=checkout, Owner=team-payments and CostCenter=4410. Operations uses them to target Systems Manager commands and patch groups, select AWS Backup resources, control access with ABAC, build resource groups and dashboards, and filter Compute Optimizer and Trusted Advisor results. For cost, tags must be activated as cost allocation tags in the Billing console before they appear in Cost Explorer and Cost and Usage Reports; activation is not retroactive. Tag policies in AWS Organizations standardise tag keys and values, and the Tag Editor finds and edits tags across Regions.
Cost Explorer, Cost and Usage Reports and Savings Plans
AWS Cost Explorer graphs costs and usage by service, account, Region, usage type and cost allocation tag for up to 13 months (longer with multi-year data enabled), forecasts spending, and gives right-sizing and Savings Plans purchase recommendations. AWS Cost and Usage Reports (CUR, now delivered through Data Exports as CUR 2.0) provide the most detailed line-item data in S3 for analysis with Athena. Savings Plans commit to a dollar amount per hour for one or three years in exchange for lower prices: Compute Savings Plans apply to any EC2 instance family, Region, Fargate and Lambda; EC2 Instance Savings Plans give larger discounts for one instance family in one Region. The following table summarises the cost tools in scope for the exam.
| Tool | Use it to |
|---|---|
| Compute Optimizer | Right-size EC2, Auto Scaling groups, EBS, Lambda, Fargate and RDS |
| Cost Explorer | Visualise and forecast cost by service, account and tag; view recommendations |
| Cost and Usage Reports | Analyse detailed line items with Athena |
| Savings Plans | Lower the price of steady-state compute usage |
| Cost allocation tags | Attribute costs to teams, applications and environments |
Which cost tool?
Acting on recommendations safely
Compute Optimizer marks 40 m5.2xlarge instances as over-provisioned with a recommendation of m7g.large and low performance risk. Memory data is missing, so the operator first deploys the CloudWatch agent with Systems Manager and waits two weeks for memory-aware recommendations, which change the suggestion to m7g.xlarge. The change is made through the launch template and an Auto Scaling instance refresh, a few instances at a time, with alarms on latency. Only after the fleet is stable does the team buy a Compute Savings Plan sized to the new, lower baseline, because buying the commitment first would lock in the over-provisioned spend.
A cost allocation tag was activated today. Does Cost Explorer show it for last month?
Show answer
No. Activation is not retroactive; the tag appears only for usage after activation.
Exam Tips
Remember for the exam
- Compute Optimizer recommends EC2, ASG, EBS, Lambda, Fargate and RDS sizes from usage.
- Memory-aware recommendations require the CloudWatch agent.
- Activate cost allocation tags before they appear in Cost Explorer; activation is not retroactive.
- Compute Savings Plans are flexible across families, Regions, Fargate and Lambda.
- Right-size first, then buy Savings Plans.