aws-stepfunctions: Escaping curly braces not supported in intrinsic functions #29261
Labels
@aws-cdk/aws-stepfunctions
Related to AWS StepFunctions
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
Describe the bug
I am trying to escape curly braces in a state machine definition, for example:
Note that the first set of curly braces in the format string are for injecting the 'Name' field, and the second set are escaped using backslashes.
Expected Behavior
The resulting definition has the curly braces properly escaped.
Current Behavior
The escaping backslash before each curly brace is doubly-escaped, leading to an error when I try to execute the state machine:
The state definition when deployed to Step Functions shows double-escaping:
Reproduction Steps
See example above
Possible Solution
The logic here incorrectly assumes all backslashes should be escaped:
https://github.com/aws/aws-cdk/blob/main/packages/aws-cdk-lib/aws-stepfunctions/lib/private/json-path.ts#L346-L347
Additional Information/Context
No response
CDK CLI Version
2.122.0
Framework Version
No response
Node.js Version
v18.19.1
OS
Linux
Language
TypeScript
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: