Generation upgrades: the basics
What does it mean to upgrade an EC2 instance generation?
AWS releases a new EC2 generation roughly every 18-24 months. The naming scheme tells the story: m4 → m5 → m6i → m7i for Intel general-purpose, c4 → c5 → c6i → c7i for compute-optimised, r4 → r5 → r6i → r7i for memory-optimised. There's a parallel AMD line (m5a, m6a, m7a) and the Arm-based Graviton line (m6g, m7g), but a generation upgrade in this lesson means staying on the same architecture and stepping forward inside the Intel or AMD family.
Here's the key thing to get right: at the same instance size, a newer generation costs roughly the same per hour as the one it replaces, sometimes a few percent more (an m7i.xlarge is about 5% above an m5.xlarge). What you gain is price/performance. AWS positions each generation as up to 15% better price/performance than the prior one, m6i vs m5, m7i vs m6i, delivered through a newer Xeon or EPYC chip, a faster Nitro hypervisor, faster networking (ENA), and faster EBS bandwidth. The dollar savings come from running the same workload on fewer or smaller instances, not from a cheaper rate at the identical shape. The AMD variants (m6a, m7a) typically price ~10% below the Intel equivalents and suit workloads that don't depend on Intel-specific instructions.
An out-of-date fleet, anything still on m4, c4, r4, or even m5, is leaving that price/performance gain on the table. Cost Optimization Hub surfaces these as an Upgrade EC2 instance action with the current type, the recommended type, and projected monthly savings. Because the newer family is faster per vCPU, the recommended option is often a smaller size in the same family that runs the workload for less, so the upgrade and a right-size land together, and the projected savings reflect that, not a same-size rate cut.
In this lesson you'll learn how to read a Cost Optimization Hub Upgrade:Ec2Instance recommendation, what compatibility checks actually matter for an x86 → x86 generation jump, and how to apply the change safely, both for single instances and for ASG-managed fleets. You'll also see how Reserved Instances and Savings Plans interact with the upgrade, and how to avoid stranding commitments on the old generation.
The free 15% upgrade nobody applies
AWS positions m6i as delivering up to 15% better price/performance than m5, same hourly rate per size, materially more throughput from a 3rd-gen Xeon, requiring no code change, no architecture change, and an identical AMI in 99% of cases. The catch is that you only bank that 15% if you act on it: keep the same size and you pay the same and run faster; downsize into the headroom and the bill actually drops. Industry surveys suggest a large share of customer instances are still on a prior generation more than eighteen months after the newer one ships. The block on the upgrade is almost never technical; it's that nobody is paid to go look.
Generation upgrade in action
Marco runs platform infrastructure at a logistics SaaS. The monthly FinOps review surfaces 38 instances still on m5.2xlarge across three production services. They were picked when the cluster was first stood up in 2022 and never touched since.
Cost Optimization Hub is recommending Upgrade:Ec2Instance on every one of them, current type m5.2xlarge, recommended type m7i.xlarge, projected savings $1,640/month at the fleet level. A same-size m5.2xlarge → m7i.2xlarge swap would cost a few percent more per hour, so the savings come from the downsize: the m7i's faster 4th-gen Xeon runs each workload's measured load on half the vCPUs. He spot-checks one, projected CPU peak 38% and memory peak 51% on the smaller shape, same architecture (x86_64). The AMI is Amazon Linux 2023, which already ships an ENA driver new enough for the m7i family.
He decides to roll the ASG-managed services via launch-template versioning, and the two standalone bastion-style boxes via stop → modify-instance-attribute → start. The whole change is scheduled for the next maintenance window with a documented rollback path back to the previous launch-template version.
First, pull the Cost Optimization Hub recommendations for the account to see the upgrade candidates.
Cost Optimization Hub flagging two upgrade candidates whose savings come from a newer, faster family at a smaller size.
Cross-check with Compute Optimizer to confirm the workload's measured load fits the smaller, faster target with no performance-risk surprises.
Compute Optimizer confirms the m5.2xlarge → m7i.xlarge move is a low-effort, low-risk downsize onto a faster generation.
Generation upgrades under the hooddeep dive
Every EC2 generation past m5 runs on the Nitro hypervisor, a thin, hardware-offloaded virtualisation layer that gives the guest near-bare-metal performance and a stable device interface. This is why the upgrade tends to be a clean swap: the Nitro contract is the same across m5, m6i, and m7i, so an AMI built for one usually boots on the others without driver changes. The exception is older AMIs (pre-2020) that pinned the ENA driver to a specific version, those need an updated driver before the new instance will see its NICs, or the boot fails in a confusing way.
Price/performance improves across generations because AWS amortises the hardware cost across a denser, faster fleet. An m7i.2xlarge has the same 8 vCPU / 32 GiB shape as an m5.2xlarge and prices a few percent higher per hour, but the underlying host is a 4th-gen Intel Xeon (Sapphire Rapids) running more instances per physical socket. The rate stays roughly flat per size while the IPC improvement is yours for free, so the cost win is realised by running the same workload on a smaller size in the newer family, not by a same-size rate cut. AMD variants (m6a, m7a) typically price ~10% below the Intel equivalent in the same generation because EPYC chips offer more cores per socket.
The change itself depends on how the instance is managed. For an EBS-backed standalone box, the workflow is stop → modify-instance-attribute --instance-type → start, a 30-90 second outage. For ASG/EKS-managed fleets, you create a new launch-template version with the upgraded InstanceType, mark it $Default, and either trigger an instance-refresh (ASG) or update-nodegroup-version --force-update (EKS) to roll the fleet one node at a time. Spot fleets get the upgrade for free on the next interruption, newer generations generally have better Spot availability and lower interrupt rates because the underlying capacity pool is larger.
# Single instance: brief outage to swap the type.
aws ec2 stop-instances --instance-ids i-0abc123def456
aws ec2 wait instance-stopped --instance-ids i-0abc123def456
aws ec2 modify-instance-attribute \
--instance-id i-0abc123def456 \
--instance-type '{"Value":"m7i.2xlarge"}'
aws ec2 start-instances --instance-ids i-0abc123def456
# ASG-managed: roll the fleet via launch-template + instance refresh.
aws ec2 create-launch-template-version \
--launch-template-id lt-0abc123def456 \
--source-version '$Latest' \
--launch-template-data '{"InstanceType":"m7i.2xlarge"}'
aws ec2 modify-launch-template \
--launch-template-id lt-0abc123def456 \
--default-version '$Latest'
aws autoscaling start-instance-refresh \
--auto-scaling-group-name workers-prod \
--preferences '{"MinHealthyPercentage":90,"InstanceWarmup":300}' What is the impact of staying on old generations?
The direct cost is the simplest to quantify. A 1,000-instance fleet still on m5 when m7i is available isn't overpaying on the same-size rate, that rate is roughly flat, but it is forgoing the price/performance gain. Because the newer chip is ~10-15% faster per vCPU, much of the fleet can run the same load on a smaller m7i size, and that consolidation is where 8-15% of fleet spend is sitting untouched, $90-150k/year for a mid-sized SaaS. The longer the fleet sits on m5, the longer that headroom goes uncaptured every month.
The second-order impact is committed-spend distortion. If you sign a 1-year EC2 Instance Savings Plan or family-locked RI on m5, those commitments only apply to the m5 family, they don't transfer to m6i or m7i. A team that commits aggressively to the wrong generation finds itself locked in: upgrading would strand the discount, but staying on m5 means forgoing the newer generation's price/performance, the 8-15% the consolidated, smaller-instance footprint would have saved. The clean answer is Compute Savings Plans, which cover any instance family in any region, including the newer generations as they ship, and to upgrade before committing, not after.
There's also a Spot dimension. Newer generations have larger, deeper capacity pools because they're the host type AWS is actively building out. m7i Spot prices are typically 5-10% lower than m5 Spot, and the interruption rate is meaningfully better, AWS preferentially reclaims older capacity to consolidate fleets on newer hosts. Workloads that lean on Spot pay an invisible tax by staying on legacy generations: more interruptions, worse pricing, smaller pool to draw from.
Finally, there's the slow-burn risk of deprecation. AWS doesn't formally retire generations but capacity in popular regions thins out, m4 and c4 are now hard to launch on-demand in some regions, and Compute Optimizer flags them as Underprovisioned by default because the underlying hardware is genuinely slower. Staying on a generation more than two steps behind current is an unforced reliability risk.
How do you upgrade safely?
Generation upgrades are the easiest cost-perf win in AWS, but only if you run them as a continuous process rather than a one-off project. Four steps, each cheap; the cost is in skipping any of them.
1. Inventory by generation, not just by family
Pull every running instance and group it by family generation (m4 vs m5 vs m6i vs m7i). Anything more than one generation behind current is a candidate. The Cost Optimization Hub Upgrade:Ec2Instance recommendation list gives you this view directly, with per-instance projected savings. Treat instances older than two generations as a reliability concern, not just a cost one.
2. Verify AMI compatibility before rolling
For most modern AMIs (Amazon Linux 2, Amazon Linux 2023, Ubuntu 20.04+) the upgrade is a pure drop-in. The compatibility check is the ENA driver version, older custom AMIs may pin a driver too old for m6i/m7i NICs. Test on a single instance in a non-prod environment first, confirm boot and NIC enumeration, then roll. If the AMI is too old, bake a new one before the fleet upgrade.
3. Use launch templates and instance-refresh, never console clicks
ASG-managed fleets must be upgraded via a new launch-template version, a console-edited instance type doesn't survive the next replacement and silently reverts. Standalone instances can be done with modify-instance-attribute between stop/start. For RDS the equivalent is ModifyDBInstance with --apply-immediately false so the change waits for the maintenance window.
4. Prefer Compute Savings Plans over family-locked RIs
If you're going to commit, use Compute Savings Plans, they apply to any instance family, any generation, any region, and they don't strand when you upgrade. EC2 Instance Savings Plans and Standard RIs are locked to a family-and-region pair, so an m5 commitment doesn't cover the m6i you upgrade to. Right-size, upgrade generation, then commit, in that order.
# List every running instance grouped by family generation.
aws ec2 describe-instances \
--filters Name=instance-state-name,Values=running \
--query 'Reservations[].Instances[].[InstanceId,InstanceType]' \
--output text \
| awk '{ split($2,a,"."); print a[1] }' \
| sort | uniq -c | sort -rn
# Anything in m4/m5/c4/c5/r4/r5 is a candidate. Cross-check with the Hub. Quick quiz
Question 1 of 5Cost Optimization Hub recommends upgrading an ASG of 12 m5.xlarge instances to m6i.xlarge, with projected savings of $310/month and migrationEffort: VeryLow. You have an EC2 Instance Savings Plan covering the m5 family in this region. What's the right move?
You scored
0 / 5
Keep learning
Dig deeper into generation upgrades, AWS Nitro, and how the savings programmes interact.
- AWS Cost Optimization Hub documentation The recommendation engine that surfaces `Upgrade:Ec2Instance` actions across your accounts.
- Amazon EC2 instance types, current generation Per-family details on m6i / m7i / c7i / r7i and the AMD m6a / m7a equivalents.
- AWS Compute Optimizer, EC2 recommendations How Compute Optimizer evaluates instance types, performance risk, and migration effort.
- Savings Plans, types and coverage Why Compute Savings Plans survive generation upgrades and Instance Savings Plans don't.
You've completed Upgrade EC2 instances to the newest generation. You now know how to read a Cost Optimization Hub upgrade recommendation, when an x86 → x86 generation jump is a pure drop-in versus when it needs an AMI refresh, and how to roll the change safely across single instances and ASG-managed fleets without stranding your Savings Plans. Inventory, verify, roll, commit, in that order, and on a quarterly cadence.
Back to the library