Skip to content

[ec2]: fix ebs io2 and gp3 size limit #37045

@edtan-caseware

Description

@edtan-caseware

Describe the bug

io2 has a size range from 4 GiB - 64 TiB and gp3 from 1 GiB - 64 TiB (https://docs.aws.amazon.com/ebs/latest/userguide/ebs-volume-types.html). The current max size limit in aws-cdk is incorrectly set to 16 TiB: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-ec2/lib/volume.ts#L826.

Note that the gp3 limit was increased back in Sept. 2025 (https://aws.amazon.com/about-aws/whats-new/2025/09/amazon-ebs-size-provisioned-performance-gp3-volumes/)

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Library Version

No response

Expected Behavior

aws-cdk should allow creating EBS io2 volumes larger than 16 TiB.

Current Behavior

aws-cdk fails when attempting to creating EBS io2 and gp3 volumes larger than 16 TiB.

`io2` volumes must be between 1 GiB and 16384 GiB in size.

Reproduction Steps

dataVolume = new ec2.Volume(scope, 'test', {
      volumeType: ec2.EbsDeviceVolumeType.IO2,
      iops: 3000,
      size: Size.gibibytes(25000),
      ...

Possible Solution

Update Max for io2 and gp3 to 65536 here: https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-ec2/lib/volume.ts#L826

Additional Information/Context

No response

AWS CDK Library version (aws-cdk-lib)

aws-cdk-lib@2.189.1

AWS CDK CLI version

2.1004.0 (build f0ad96e)

Node.js Version

v20.17.0

OS

WSL2 (ubuntu): Linux CA-PF3MQVN5 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Language

TypeScript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-ec2Related to Amazon Elastic Compute CloudbugThis issue is a bug.effort/smallSmall work item – less than a day of effortp1

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions