Technical Guide

Idle EC2 Instances

How to identify idle EC2 instances? EC2 instances using under 5% CPU consistently over the last 24 hours are effectively idle and can be stopped or terminated to eliminate compute waste.

2 min read
High impact optimization

Why This Matters

Idle EC2 instances consume full compute resources and billing while providing minimal actual workload. Unlike oversized instances that still serve purpose, idle instances below 5% CPU likely serve no meaningful function and represent pure waste.

Common causes:

  • Over-provisioned development environments
  • Forgotten test instances
  • Applications that no longer receive traffic but weren't properly decommissioned

How to Identify Idle EC2 Instances

AWS Saver flags EC2 instances as idle when they meet these criteria:

  1. CPU utilization under 5% averaged over 24 hours
  2. Running state (not stopped or terminated)
  3. Aged over 7 days (avoids flagging new deployments)
  4. Monthly cost above $5 (focuses on meaningful savings)

How to Fix Idle EC2 Instances

Step 1: Find all running instances

aws ec2 describe-instances \
  --filters Name=instance-state-name,Values=running \
  --query 'Reservations[].Instances[?State.Name==`running`].[InstanceId,InstanceType,Tags[?Key==`Name`].Value|[0]]'

Step 2: Get CPU utilization over 24 hours

aws cloudwatch get-metric-statistics \
  --namespace AWS/EC2 \
  --metric-name CPUUtilization \
  --dimensions Name=InstanceId,Value=i-1234567890abcdef0 \
  --statistics Average \
  --start-time $(date -u -d '1 day ago' +%Y-%m-%dT%H:%M:%SZ) \
  --end-time $(date -u +%Y-%m-%dT%H:%M:%SZ) \
  --period 3600

Automation Available

Skip the manual work. AwsSaver automatically detects and prioritizes this issue across your entire AWS infrastructure.

Automated detection - Scans running instances for idle usage patterns ✅ Cost impact analysis - Shows exact monthly waste per idle instance
Conservative filtering - Only flags instances aged over 7 days and above $5/month cost

Ready to Optimize Your AWS Costs?

Skip the manual work. Get automated EC2 optimization across your entire AWS infrastructure.

60-second setup • No credit card required • Immediate results

Automation Available

Skip the manual work. AWS Saver automatically detects and prioritizes this issue across your entire AWS infrastructure.

60-second setup • No credit card required

Manual vs Automated

Manual Process

  • • Run commands across all regions
  • • Set up monitoring and alerts
  • • Repeat regularly for new issues
  • • Scale across multiple accounts

AWS Saver Automation

  • • Continuous multi-region scanning
  • • Automatic cost impact analysis
  • • Real-time alerts and notifications
  • • Cross-account visibility