AWS in 1 Min · Episode 163

AWS Compute Optimizer explained: right-size from real usage

Right-size from real usage. Watch the one-minute video, then read the details.

David Gomez1:18 video · 2 min read

"A bigger instance is the safe choice." Safe, and expensive. Most instances are sized once, at launch, from a guess about future load, and then nobody looks at them again. Months later the server averages a fraction of its CPU and you pay for all of it. AWS Compute Optimizer replaces the guess with your real usage.

What Compute Optimizer does

Compute Optimizer analyzes the configuration and CloudWatch utilization metrics of your resources and, using machine learning, recommends a better size or type. You opt in first (a single account, or the management account for a whole organization); after that the default analysis is free.

It covers more than EC2: EC2 instances, Auto Scaling groups, EBS volumes, Lambda functions, ECS services on Fargate, RDS and Aurora databases, plus NAT gateways, DynamoDB, ElastiCache, MemoryDB, DocumentDB, WorkSpaces, SageMaker and commercial software licenses.

Reading a recommendation

For an EC2 instance you get a finding:

  • Over-provisioned: you can go smaller and save money.
  • Under-provisioned: the resource is short of CPU, memory or I/O; performance is at risk.
  • Optimized: it fits.

The resource page shows up to three options, with their price and the projected utilization on each, so you can choose the balance of cost and headroom yourself. You can also tune rightsizing preferences such as CPU and memory headroom or preferred instance families.

Better data, better advice

  • Lookback: by default Compute Optimizer uses the last 14 days of metrics. Enhanced infrastructure metrics, a paid option, extends that to 93 days, which catches monthly peaks.
  • Memory: EC2 doesn't report memory on its own. Install the CloudWatch agent (or ingest memory metrics from Datadog, Dynatrace, Instana or New Relic) or memory-bound servers can be recommended too small.
  • Idle resources: it also flags resources doing almost nothing, which you can stop or delete.

A common mistake is applying a recommendation straight to production. Check the projected graphs, change one instance, watch it for a week, then roll out. Read it alongside EC2 instance types so a family change (for example to Graviton) doesn't surprise your software.

Where AI fits

GPUs are usually the biggest line on an AI bill. With the CloudWatch agent collecting NVIDIA GPU metrics (GPU and GPU memory utilization), Compute Optimizer can make recommendations for supported GPU instances too, instead of judging them by CPU alone. It also reports idle SageMaker endpoints: inference endpoints left running after a test, billing every hour for nothing.

Quick recap

  • Size from data, not guesses: findings show over-provisioned, under-provisioned or optimized.
  • Add the CloudWatch agent for memory and GPU metrics, or the advice is blind to them.
  • Delete what's idle, including forgotten SageMaker endpoints.
AWS in 1 Min #163 · 1:18

Need an AWS expert on your team?

I'm David, an AWS expert and fractional cloud consultant. I work alongside your team to run your cloud and infrastructure: architecture, security, cost and day-to-day operations. You get senior AWS experience when you need it, without the cost of a full-time hire.

  • Architecture reviews and a clear plan for what to fix first
  • Security hardening: IAM, networking, audits
  • Lower AWS bills without slowing your team down
  • Hands-on help with AI workloads on AWS