Purpose
The purpose of the EC2 Rightsizer is to save compute costs in the cloud by optimizing hardware associated with EC2 instances based on historical utilization data of CPU, memory, network, and storage metrics. Easily identify savings opportunities for your EC2 instances across any number of AWS accounts and regions. Using AWS Compute Optimizer, this system retains the recommendation with the highest savings, lowest performance risk, and lowest migration effort as the "Rightsize" type. This system also provides a cheaper, AMD-based equivalent instance type as the "AMD_NewGen" type for further cost optimization. The "Best" type compares the "Rightsize" and "AMD_NewGen" types and provides the type that will yield the most savings.
Example 1: Rightsize a single instance from a m5.8xlarge to a c5.2xlarge for 76.5% savings, or $20,148/yr in savings.
Example 2: Convert a single instance from a r4.4xlarge to a r6a.4xlarge for 9% savings, or $1,373/yr in savings.
Requirements
- (Optional) Enable AWS Compute Optimizer (No Cost) for each account with EC2 instances to provide "Rightsize" type suggestion
- (Optional) AWS SSM Agent installed on Windows EC2 instances for upgrading drivers as needed
- Onboard AWS Accounts into a Target Group for discovering instances across desired regions & accounts
- E1 Role Permissions: ec2:describe, pricing:, ec2:modifyInstance, ec2:stopInstances, ec2:startInstances, ssm:rundocument, costoptimizer:describe*
- (Optional) Complete setup of the GenAI Features within your instance of Echelon One (see documentation)
- (Optional) Complete setup for Parallel Modify Instance Type by creating a command webhook to Modify Instance Type's environment variable
ModifyInstanceTypeWebhookURL
Commands
- Discover Instances: Run this command with a target group of AWS accounts and a single region to bring every EC2 instance into the system dashboard, populating the data table and visualization components to provide a single-pane of glass of all your resources and their savings opportunities. Important information such as account, region, instance id, instance type, tags, and more can easily be brought in to enhance operationalization. This system provides all the tools needed to automate rightsizing of instances, including the ability to be scheduled periodically for continuous & iterative optimization.
- Stop Instance: Select an instance from the system data table and run this command to stop the instance.
- Start Instance: Select an instance from the system data table and run this command to start the instance.
- Modify Instance Type: Select a number of instances from the system data table to stop each instance, modify the instance type, and then start it.
- Rightsize Type: Select a number of instances from the system data table to stop each instance, modify the instance type to the type shown in the RightsizeType column (based on Compute Optimizer), and then start it.
- Convert to AMD Type: Select a number of instances from the system data table to stop each instance, modify the instance type to the type shown in the AMD_NewGen column, and then start it.
- Rightsize Best Type: Select a number of instances from the system data table to stop each instance, modify the instance type to the type shown in the BestType column, and then start it.
- Update Windows Drivers: Select a number of instances from the system data table to run the SSM Run Document managed by AWS (WindowsUpdateDrivers) for each instance and update nitro drivers, paravirtual, and more to support a newer instance type.
- Parallel Modify Instance Type: The Modify Instance command, but will run the instance type modification workflow in parallel for every selected resource.
- Create Executive Report: Creates a high-level markdown report for the system's total potential savings based on each criteria (rightsizing, AMD, best), as well as the current state of over-provisioned, under-provisioned, and optimized.
- Clear Dataset: Deletes the entire system dataset. This action is irreversible, and all group assignments will be lost.
Detectors & Triggers
- AMD Type Has Savings: Detects instances where the equivalent AMD-based instance type is greater than 0.
- Best Type Has Savings: Detects instances where the best recommendation savings is greater than 0.
How-to
- Execute Discover Instances command with your target accounts & single region to bring in all your instances and recommendations data.
- Identify instances you want to rightsize, and for Windows instances, run the Update Drivers Command.
- Run appropriate modify instance type command.
- If instance fails a status check, change back to the original type and open a support case with AWS to get a definitive answer on why it does not work (this could be a myriad of reasons, for example a vendor-locked AMI).