0Pricing
AWS Solutions Architect · Lesson

Right-Sizing and Compute Optimizer

Use AWS Compute Optimizer recommendations to downsize over-provisioned EC2 instances, Lambda functions, and EBS volumes to lower costs.

The Over-Provisioning Problem

One of the most common and costly mistakes in cloud architecture is over-provisioning — allocating more resources than the workload actually needs. IT teams often over-provision due to on-premises habits (buying capacity for peak load), fear of performance degradation, or simply never reviewing initial sizing decisions. In AWS, over-provisioned EC2 instances, EBS volumes, and Lambda functions waste money every minute they run. Right-sizing is the systematic process of identifying and eliminating this waste.

# Common over-provisioning symptoms:
# EC2: average CPU < 10%, memory < 20%
# RDS: storage auto-grow never triggered
# Lambda: allocated memory rarely exceeds 40%
# EBS: provisioned IOPS consistently unused

# Cost impact example:
# Over-provisioned r5.8xlarge at $1.92/hr: $1,382/month
# Correct size r5.xlarge at $0.252/hr:      $181/month
# Savings: $1,201/month per instance

AWS Compute Optimizer Overview

AWS Compute Optimizer analyses historical utilisation metrics from CloudWatch and uses machine learning to recommend optimal AWS compute resources. It covers EC2 instances, EC2 Auto Scaling Groups, EBS volumes, Lambda functions, and Amazon ECS on Fargate. Compute Optimizer requires at least 30 days of metric history to generate confident recommendations. It is free to enable and provides recommendations with estimated monthly savings and a risk rating for changing.

# Opt in to Compute Optimizer
aws compute-optimizer update-enrollment-status \
  --status Active

# Get EC2 recommendations
aws compute-optimizer get-ec2-instance-recommendations \
  --query 'instanceRecommendations[].{Instance:currentInstanceType,Recommended:recommendationOptions[0].instanceType,Savings:recommendationOptions[0].estimatedMonthlySavings.value,Risk:recommendationOptions[0].performanceRisk}'

# Get Lambda recommendations
aws compute-optimizer get-lambda-function-recommendations

All lessons in this course

  1. Right-Sizing and Compute Optimizer
  2. Reserved Instances, Savings Plans, and Spot
  3. Cost Explorer, Budgets, and Cost Allocation Tags
  4. S3 and Data Transfer Cost Optimisation
← Back to AWS Solutions Architect