Skip to content

stepfunctions_tasks: Upgrade the volume type when creating EMR cluster with the EmrCreateCluster task #28874

@lafeuil

Description

@lafeuil

Describe the bug

In the step function, when creating an EMR cluster with the EmrCreateCluster task, the EBS volume of each instance can be configured. The volume is described by the VolumeSpecificationProperty interface and the type of each volume by the volumeType property and the EbsBlockDeviceVolumeType enum.

But in the EbsBlockDeviceVolumeType, there are only the gp2, io1 and standard type. The EMR specification of the RunJobFlow action accepts for the VolumeType property : gp3, gp2, io1, st1, sc1, and standard.

Expected Behavior

The EmrCreateCluster task should accept all supported volume type of the RunJobFlow action : gp3, gp2, io1, st1, sc1, and standard.

Current Behavior

The EmrCreateCluster task only accepts gp2, io1 and standard EBS volume type.

Reproduction Steps

new EmrCreateCluster(scope, 'Create Cluster', {
  name: 'MyCluster',
  instances: {
    instanceFleets: [
      {
        instanceFleetType: EmrCreateCluster.InstanceRoleType.CORE,
        instanceTypeConfigs: [
          {
            instanceType: 'r6g.xlarge',
            ebsConfiguration: {
              ebsBlockDeviceConfigs: [
                {
                  volumeSpecification: {
                    volumeSize: Size.gibibytes(256),
                    volumeType: EmrCreateCluster.EbsBlockDeviceVolumeType.GP3,
                  },
                },
              ],
            },
          },
        ],
      },
    ],
  },
});

Possible Solution

Upgrade the EbsBlockDeviceVolumeType enum with the missing value : gp3, st1, and sc1.

Additional Information/Context

No response

CDK CLI Version

2.123.0

Framework Version

No response

Node.js Version

20

OS

linux

Language

TypeScript

Language Version

No response

Other information

Some comments in other issue :

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions