-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Description
Describe the bug
It looks like there's a discrepancy between the expected data type of the maxConcurrency parameter of step functions Map construct between Cloudformation and CDK:
- AWS documentation reports that it's valid for
MaxConcurrencyto be a JSONata expression:In JSONata states, you can specify a JSONata expression that evaluates to an integer.(documentation) - in aws-cdk, the data type is a
numberexplicitly:readonly maxConcurrency?: number;
Regression Issue
- Select this option if this issue appears to be a regression.
Last Known Working CDK Library Version
No response
Expected Behavior
I expect to be able to pass in a valid JSONata expression string for the maxConcurrency parameter of state machine / step functions Map construct, based on the AWS documentation.
Current Behavior
Currently, trying to pass a JSONata expression string as the value for this parameter in CDK results in an error shaped like this (in my case, python): TypeError: type of argument max_concurrency must be one of (int, float, NoneType); got str instead
I've worked around this by using JSONPath instead (which has its own limitations for my use case), but I wanted to flag this discrepancy here for visibility.
Reproduction Steps
Passing in any valid JSONata expression for maxConcurrency of the Map construct results in the above error.
Possible Solution
No response
Additional Information/Context
No response
AWS CDK Library version (aws-cdk-lib)
2.224.0
AWS CDK CLI version
2.1032.0
Node.js Version
22.14.0
OS
OSX
Language
Python
Language Version
3.12.12
Other information
No response