aws-cdk: (aws-stepfunctions-tasks): GlueStartJobRunProps missing support of AllocatedCapacity or MaxCapacity

❓ General Issue

The Question

Today in CDK GlueStartJobRunProps does not support AllocatedCapacity or MaxCapacity to configure Glue job run DPU. But based on Step Functions service integration, SFn does support parameter AllocatedCapacity when invoking Glue StartJobRun API. Will GlueStartJobRunProps support accepting AllocatedCapacity or MaxCapacity parameters? (see details of these two parameters here)

Environment

  • CDK CLI Version: 1.83.0
  • Module Version: 1.83.0
  • Node.js Version: 14.14.20
  • OS: Linux 4.9.230-0.1.ac.223.84.332.metal1.x86_64 x86_64
  • Language (Version): TypeScript (3.6.4)

Other information

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Reactions: 7
  • Comments: 16 (6 by maintainers)

Most upvoted comments

Is there any update for this issue? Here is a workaround we are using now.

export interface GlueStartJobRunProps extends tasks.GlueStartJobRunProps {
  readonly numberOfWorkers?: number;
  readonly workerType?: WorkerType;
}

export class GlueStartJobRun extends tasks.GlueStartJobRun {
  constructor(scope: Construct, id: string, private readonly enhancedProps: GlueStartJobRunProps) {
    super(scope, id, enhancedProps);
  }

  protected override _renderTask(): any {
    const state = super._renderTask();
    if (this.enhancedProps.workerType) {
      state.Parameters.WorkerType = this.enhancedProps.workerType.name;
    }

    if (this.enhancedProps.numberOfWorkers) {
      state.Parameters.NumberOfWorkers = this.enhancedProps.numberOfWorkers;
    }

    return state;
  }
}

Do we have any updates on this?

update: checking with the Step Functions team whether they’re aware of these changes given that it’s still not documented

Remaining

  • model the NumberOfWorkers and WorkerType properties
    • one thing to consider is whether they’re supported as dynamic properties (can be supplied through JSON Path) which will determine what types they should be
  • expose properties through GlueStartJobRunProps
  • get Step Functions documentation updated

@shivlaks I think you meant @johnhill2424

Hi I’m running into this as well; I really need to increase the number of workers for certain jobs.

As far as I can tell, there is no way to drop down to the Cfn* resource types for just this one action in the state machine. Is that accurate? If so, that means that I have to either port my entire state machine definition OFF of the high-level stepfunctions/stepfunctions-tasks CDK APIs and down to the low-level, or else it’s just not possible to override the number of workers when starting the glue job?