# EBS gp2 to gp3 Migration

> Migrating gp2 EBS volumes to gp3 cuts the per-GB-month storage rate, and ZopNight prices the real rate delta netted against inherited performance charges. On ModifyVolume, $0.005 per IOPS above 3,000 and $0.04 per MB/s above 125 carry over. Abstains when either rate is missing or the netted savings are not positive.

Source: https://zop.dev/integrations/aws/recommendations/ebs-gp2-to-gp3-migration
Updated: 2026-08-19

---

## Spotting a gp2 volume and its gp3 target rate

- resource.InstanceType == "gp2" (volume type encoded in InstanceType)
- SKU rates: gp2 (source, seeded from InstanceType) and gp3 (target, via TargetSKUCandidates)
- resource.Metadata["iops"] / ["throughput"] (optional; discoverer-captured current provisioned IOPS/throughput, used to net out inherited gp3 charges; see below)

## Netting the rate delta against inherited charges

real gp2→gp3 delta in [the published per-GB-month storage rate](https://aws.amazon.com/ebs/pricing/), storageSavings = cost × (1 − gp3Rate/gp2Rate), netted against any gp3 IOPS/throughput charge the volume inherits post-migration. AWS's ModifyVolume API, when no explicit target IOPS/throughput is given, provisions max(source performance, gp3 baseline), so a gp2 volume whose current IOPS exceed 3,000 or throughput exceeds 125 MB/s carries that higher performance over to gp3, where the aggregator bills it ($0.005/IOPS-month above 3,000, $0.04/MB/s-month above 125; mirrors calc_aws_storage.go). extraCost = max(0, iops−3000)×0.005 + max(0, throughput−125)×0.04, read from Metadata["iops"]/["throughput"] (absent/zero treated as within baseline, i.e. no extra charge, matching the aggregator's own behavior for unset metadata). savings = storageSavings − extraCost. The rule abstains when either storage rate is absent, the storage delta is not a real reduction (gp3Rate ≥ gp2Rate), or the netted savings is ≤0 or ≥cost, and there is no fabricated flat fraction.

## Changing volume type in place

1. Create a snapshot of the volume as backup
2. Go to EC2 Console → Volumes → Select volume
3. Actions → Modify Volume → Change type to gp3
4. Adjust IOPS and throughput if needed (gp3 baseline: 3000 IOPS, 125 MB/s)
