Skip to content

(EmrCreateCluster.OnDemandAllocationStrategy): Add support for PRIORITIZED allocation strategy and Priority property in EmrCreateCluster #35710

@Daniel-ZA

Description

@Daniel-ZA

Describe the feature

Problem:

• Missing PRIORITIZED enum value in OnDemandAllocationStrategy when creating tasks.EmrCreateCluster Only LOWEST_PRICE is available currently as per source code:

  export enum OnDemandAllocationStrategy {
    /**
     * Lowest-price, which launches instances from the lowest priced pool that has available capacity.
     */
    LOWEST_PRICE = 'lowest-price',
  }

Expected Solution:

• Add PRIORITIZED to the enum, and solution would look like:

    const emrTask = new tasks.EmrCreateCluster(this, 'OnDemandSpecification', {
      instances: {
        instanceFleets: [{
          instanceFleetType: tasks.EmrCreateCluster.InstanceRoleType.MASTER,
          targetOnDemandCapacity: 1,
          instanceTypeConfigs: [{
            instanceType: 'm5.xlarge',
            priority: 1
          }],
          launchSpecifications: {
            onDemandSpecification: {
              allocationStrategy: 'prioritized'
            },
          },

Note: The above currently fails as prioritized is not supported as well as defining priority in instanceTypeConfigs.

Impact:

• Forces developers to use complex workarounds
• Prevents using a standard AWS EMR feature
• Creates maintenance burden with escape hatches

Use Case

• Forces developers to use complex workarounds
• Prevents using a standard AWS EMR feature
• Creates maintenance burden with escape hatches

Proposed Solution

No response

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS CDK Library version (aws-cdk-lib)

2.208.0

AWS CDK CLI version

2.1025.0

Environment details (OS name and version, etc.)

MacOS, any.

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-emrRelated to Amazon EMReffort/mediumMedium work item – several days of effortfeature-requestA feature should be added or improved.p2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions