All cheat sheets
Computecheat sheet

AWS Compute Optimizer

Free ML-driven rightsizing for EC2, Auto Scaling Groups, EBS, Lambda, and Fargate — reads CloudWatch metrics over 14 days and hands you specific downsizes with dollar figures and a performance-risk rating. Enable it, install the agent for memory, act monthly.

Last reviewed: July 14, 2026

TL;DR: Compute Optimizer watches how you actually use compute — CPU, memory, network, disk over 14 days — and hands you specific rightsizing moves for EC2, Auto Scaling Groups, EBS, Lambda, and Fargate, each with a dollar figure and a low/medium/high performance-risk rating. It's free, one-click to enable, and needs no infrastructure changes. The only catch: it can't see memory without the CloudWatch Agent, and you still have to act — too many teams enable it, glance once, and forget.

The numbers

  • Findings: under-provisioned (upsize before an outage), over-provisioned (downsize — the common one), optimized, or none (insufficient data).
  • Each recommendation shows current vs recommended config, estimated monthly savings, and performance risk.
  • Coverage beyond EC2: ASG fleets, EBS (IOPS/throughput), Lambda memory (often raising memory cuts cost by finishing faster), and Fargate CPU/memory.
  • Field examples: a startup downsized c5.4xlarge/r5.2xlarge → c5.xlarge/r5.large for $1,200/mo ($14,400/yr); an enterprise on legacy m4/c4 acted on its top 50 recs for $40,000/mo; a batch team combined "high-risk downsize" flags with Spot + ASG for a 60% cut.

Do this

  1. Opt in (one click), install the CloudWatch Agent for memory metrics, and wait 14 days — without the agent it's CPU-blind and can't be trusted on memory-bound workloads.
  2. Sort by estimated savings, then check performance risk — low-risk goes ahead; high-risk gets tested in staging first.
  3. Read the utilization graphs before acting — sustained high usage means be cautious; a low 14-day average on a bursty workload can mislead.
  4. Resize (stop → change type → start, or update the ASG launch template) and monitor CloudWatch for a few days after.
  5. Make it a monthly habit — top 5 opportunities, test, deploy; recommendations age fast, and Enhanced Infrastructure Metrics (paid, ~$0.0003/instance-hr) extends the lookback to 93 days for irregular workloads.

Gotchas

  • Memory needs the agent — the single most important setup step; missing it silently limits every memory recommendation.
  • Savings assume on-demand list price — RI/SP-covered resources save less (still real).
  • Bursty and batch workloads mislead it — an instance idle 99% of the time but pegged 5 min/day can be flagged for a downsize you'll regret; consider Spot + autoscaling instead.
  • Custom bottlenecks are invisible — it only sees standard CloudWatch metrics, not app-level limits like DB connection pools.
  • Recommendations lag reality — a workload that changed last week may not be reflected yet.

Skip this if

Run this audit with your AI assistant

Paste this into Claude, ChatGPT, or any agent that can run the AWS CLI with read-only credentials. It audits your account for exactly the waste this sheet describes — and changes nothing.

You are auditing an AWS account using Compute Optimizer recommendations.
Use the AWS CLI with READ-ONLY credentials. Do not create, modify, or
delete anything — report findings and recommended (unapplied) fixes only.

1. Enablement: aws compute-optimizer get-enrollment-status (opt-in? Org-
   wide?). Flag if memory metrics are missing (no CloudWatch Agent) —
   recommendations are CPU-blind without it.
2. Pull recommendations: get-ec2-instance-recommendations,
   get-auto-scaling-group-recommendations, get-ebs-volume-
   recommendations, get-lambda-function-recommendations, get-ecs-service-
   recommendations. Capture current vs recommended, estimated monthly
   savings, and performanceRisk; sort by savings desc.
3. Verdicts: separate OVER_PROVISIONED (downsize), UNDER_PROVISIONED
   (upsize before outage), and OPTIMIZED. Flag high-performance-risk and
   bursty/batch workloads for test-first, not blind downsize.
4. Savings caveat: estimates use on-demand pricing — net savings lower
   where RIs/SPs cover the resource. Note Enhanced Infrastructure Metrics
   (93-day lookback) for irregular workloads.

Report a table: resource | finding | current -> recommended | est. $/mo |
perf risk | memory data? | act/test/defer. Change nothing.
Works with any assistant that can run shell commands.

Want the guided version?

The AWS Compute Optimizer walkthrough covers this topic interactively — it asks about your setup, branches to what’s relevant, and quizzes you on the tricky parts. Free and anonymous.

Start the walkthrough