fix(ec2): allow EBS gp3 and io2 volumes up to 64 TiB#37049
Open
aayushostwal wants to merge 1 commit intoaws:mainfrom
Open
fix(ec2): allow EBS gp3 and io2 volumes up to 64 TiB#37049aayushostwal wants to merge 1 commit intoaws:mainfrom
aayushostwal wants to merge 1 commit intoaws:mainfrom
Conversation
This was referenced Feb 22, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue # (if applicable)
Closes #37045.
Reason for this change
EBS volume size limits in AWS have been updated: io2 supports 4 GiB–64 TiB and gp3 supports 1 GiB–64 TiB (EBS volume types; gp3 limit increased Sept 2025). The CDK was still enforcing a 16 TiB (16384 GiB) maximum for both, causing validation errors when creating io2 or gp3 volumes larger than 16 TiB (e.g.
Size.gibibytes(25000)). This change aligns CDK validation with current AWS limits.Description of changes
packages/aws-cdk-lib/aws-ec2/lib/volume.tsRaised max size for
GENERAL_PURPOSE_SSD_GP3(gp3) andPROVISIONED_IOPS_SSD_IO2(io2) from 16384 GiB to 65536 GiB (64 TiB). Left gp2, io1, st1, sc1, and magnetic limits unchanged per current AWS docs.packages/aws-cdk-lib/aws-ecs/lib/base/service-managed-volume.tsApplied the same gp3 and io2 max size (65536 GiB) for ECS Service Managed EBS volumes so behavior matches the EC2
Volumeconstruct.packages/aws-cdk-lib/aws-ec2/test/volume.test.tsUpdated the “validation size in range” test data so the expected max for gp3 and io2 is 65536 instead of 16384.
No API or behavior changes for other volume types; only validation bounds were updated. Alternatives considered: updating all volume types to 64 TiB was rejected because AWS still documents 16 TiB max for gp2, io1, st1, and sc1.
Describe any new or updated permissions being added
None. This change only adjusts client-side validation limits; it does not introduce or change any IAM or resource permissions.
Description of how you validated changes
packages/aws-cdk-lib/aws-ec2/test/volume.test.ts(including “validation size in range”). Tests confirm that min/max (e.g. 1/65536 for gp3, 4/65536 for io2) are accepted and values outside the range are rejected.aws-cdk-libbuild and relevant tests pass (e.g.yarn test aws-ec2).Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license