Skip to main content

EC2: Downsize Over-Provisioned Instances

Difficulty: Medium

Description

AWS Compute Optimizer found that these instances use far less CPU and memory than they have. Moving each one to the type we suggest lowers its cost while keeping enough headroom.


Selection Criteria

  • The instance is running and was launched at least 31 days ago.

  • AWS Compute Optimizer classifies the instance as over-provisioned.

  • The CloudWatch agent reports memory utilization for the instance, so that the recommendation accounts for memory and not only CPU.

  • The instance is not covered by a Savings Plan or a Reserved Instance. Covered instances are excluded because resizing them would not lower the bill in the same way.

  • The recommended instance type is compatible: same architecture, hypervisor, virtualization type, network and storage interfaces as the current one, and at least as much memory.


Expected Saving

We take the instance's real billed cost from the CUR over the last 7 days (including your discounts) and annualize it. The saving is that cost multiplied by the relative on-demand price drop between the current and the recommended instance type. We use the first option in Compute Optimizer's ranking that meets the compatibility criteria above.

Example: an m5.2xlarge (8 vCPU, 32 GiB, $0.384/hour on demand in us-east-1) billed $3,000/year, rightsized to an r5.xlarge (4 vCPU, 32 GiB, $0.252/hour):

  • Price drop: ($0.384 − $0.252) / $0.384 = 34.4%

  • Annual saving: $3,000 × 34.4% ≈ $1,031/year


Operational Impact

  • ⚠️ Downtime required — changing the instance type requires stopping and starting the instance. Plan the change during a maintenance window, or roll it out instance by instance behind a load balancer or Auto Scaling group.

  • ⚠️ Validate performance — Compute Optimizer bases its finding on past utilization. Check peak periods (month-end, batch jobs, seasonal traffic) before downsizing.

  • ⚠️ Instance store and Elastic IPs — data on instance store volumes is lost on stop. A public IPv4 address that is not an Elastic IP changes after the restart.

  • ✅ Reversible — if the new type is too small, you can stop the instance and switch back to the previous type.

  • ✅ Resolution — the recommendation is marked resolved once the instance runs on the recommended type, or once Compute Optimizer no longer considers it over-provisioned.


References

Did this answer your question?