Skip to main content

πŸ“ AWS EC2 Instance is underutilized 🟒

  • Contextual name: πŸ“ Instance is underutilized 🟒
  • ID: /ce/ca/aws/ec2/instance-underutilized
  • Located in: πŸ“ AWS EC2

Flags​

Our Metadata​

  • Policy Type: COMPLIANCE_POLICY
  • Policy Category:
    • COST
    • PERFORMANCE

Logic​

Description​

Open File

Description​

Identify Amazon EC2 instances that are underutilized, meaning they consistently have average CPU utilization below 40% and maximum CPU utilization does not spike above 50% over a 14-day period. Underutilized instances are often oversized for their workloads, leading to unnecessary costs. By right-sizing or consolidating workloads, organizations can improve cost efficiency and ensure effective use of compute resources.

Rational​

Underutilized EC2 instances consume resources inefficiently, leading to higher costs without proportional benefits. These instances may indicate improper sizing or unused capacity. Addressing this issue helps optimize AWS spending, improves performance allocation, and aligns resources with actual usage requirements. Right-sizing or terminating these instances also contributes to more sustainable cloud practices by reducing resource consumption.

Impact​

Resizing, consolidating, or shutting down underutilized instances reduces waste but requires careful planning to avoid performance degradation for active workloads.

... see more

Remediation​

Open File

Remediation​

Right-Size Underutilized Instances​

Change the Instance Type​
Key Requirements​

You can only change the instance type of an EC2 instance if:

  • It is an EBS-backed instance.
  • Its configuration is compatible with the new instance type.
Steps From Command Line​
  1. Stop the EC2 Instance

    Before changing the instance type, the instance must be stopped. Use the following command:

    aws ec2 stop-instances --instance-ids {{instance-id}}

    Replace {{instance-id}} with the actual EC2 instance ID.

  2. Modify the Instance Type

    After stopping the instance, use the command below to change its type:

    aws ec2 modify-instance-attribute --instance-id {{instance-id}} --instance-type "{\"Value\": \"{{new-instance-type}}\"}"

    Replace {{new-instance-type}} with the desired instance type.

Migrate to a New Instance Type​

If your instance's configuration is incompatible with the new instance type, or if it is an instance store-backed instance, consider these migration steps:

... see more

policy.yaml​

Open File

Linked Framework Sections​

SectionSub SectionsInternal RulesPoliciesFlags
πŸ’Ό Cloudaware Framework β†’ πŸ’Ό Resource Right-Sizing2
πŸ’Ό Cloudaware Framework β†’ πŸ’Ό Workload Efficiency3