Describe the bug
Allowing JSON paths for MaxConcurrency was added in response to #20152, but JSON paths are not actually supported for the MaxConcurrency key in a Map state by Step Functions.
Expected Behavior
I would expect synth to fail in the reproduction example.
Current Behavior
Synth succeeds, but deploying fails with the following error:
11:31:04 AM | CREATE_FAILED | AWS::StepFunctions::StateMachine | StateMachine2E01A3A5
Resource handler returned message: "Invalid State Machine Definition: 'SCHEMA_VALIDATION_FAILED: Expected value of type Integer at /States/Map State/MaxConcurrency'"
Reproduction Steps
import { Duration, Stack, StackProps } from 'aws-cdk-lib';
import * as stepfunctions from 'aws-cdk-lib/aws-stepfunctions';
import { Construct } from 'constructs';
export class SfReproStack extends Stack {
constructor(scope: Construct, id: string, props?: StackProps) {
super(scope, id, props);
const map = new stepfunctions.Map(this, 'Map State', {
maxConcurrency: stepfunctions.JsonPath.numberAt('$.maxConcurrency'),
itemsPath: stepfunctions.JsonPath.stringAt('$.inputForMap'),
});
map.iterator(new stepfunctions.Pass(this, 'Pass State'));
const machine = new stepfunctions.StateMachine(this, "StateMachine", {
definition: map,
stateMachineName: 'ReproStateMachine',
timeout: Duration.minutes(5),
});
}
}
Possible Solution
I think #20279 should be reverted until Step Functions supports this.
Additional Information/Context
No response
CDK CLI Version
2.28.1 (build d035432)
Framework Version
No response
Node.js Version
v18.4.0
OS
macOS 12.3.1
Language
Typescript
Language Version
No response
Other information
No response
Describe the bug
Allowing JSON paths for
MaxConcurrencywas added in response to #20152, but JSON paths are not actually supported for theMaxConcurrencykey in aMapstate by Step Functions.Expected Behavior
I would expect synth to fail in the reproduction example.
Current Behavior
Synth succeeds, but deploying fails with the following error:
Reproduction Steps
Possible Solution
I think #20279 should be reverted until Step Functions supports this.
Additional Information/Context
No response
CDK CLI Version
2.28.1 (build d035432)
Framework Version
No response
Node.js Version
v18.4.0
OS
macOS 12.3.1
Language
Typescript
Language Version
No response
Other information
No response