[StepFunctions] RunBatchJob: Can't use task input to set arraySize
Trying to use the task input to set arraySize on RunBatchJob leads to a validation error Invalid value of arraySize. The array size can be between 2 and 10,000.
I'm reporting this as a bug instead of a feature request because I think that stepfunctions task constructs should accept values from the task input for all parameters, and arraySize is an essential parameter to dynamically control parallelism.
Reproduction Steps
sfnt.RunBatchJob(
job_definition=...,
job_name=...,
job_queue=...,
array_size=sfn.Data.number_at("$.arraySize")
)
Error Log
jsii.errors.JSIIError: Invalid value of arraySize. The array size can be between 2 and 10,000.
Environment
- CLI Version : 1.30.0
- Framework Version: 1.30.0
- OS : Windows 10
- Language : Python
Other
Root cause of the error is the validation done in https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/aws-stepfunctions-tasks/lib/run-batch-job.ts#L196
This is :bug: Bug Report
Thanks for filing this bug report. I have a fix for this coming in here - https://github.com/aws/aws-cdk/pull/7008