step_functions: Support new (8/31/2022) intrinsic functions #22629
Labels
@aws-cdk/aws-stepfunctions
Related to AWS StepFunctions
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p1
Describe the feature
The Amazon States Language used by Step Functions recently added a number of very useful intrinsic functions that aren't currently supported by the CDK: https://states-language.net/#2022-08-31
When we try to use these functions, the CDK (Python variant) returns the following error indicating that the only supported functions are those present before the update:
RuntimeError: Error: JSON path values must be exactly '$', '$$', start with '$.', start with '$$.', start with '$[', or start with an intrinsic function: States.Format, States.StringToJson, States.JsonToString, or States.Array. Received: States.MathAdd($.successful_count, 1)
Use Case
These updates to the States Language are a big step forward in improving the utility of Step Functions, particularly when integrating with a range of AWS services, so it would be incredibly valuable to have them available for inclusion in our workflows.
Proposed Solution
Adding these functions to JsonPath would be useful, although a simple solution would be to add them to the allowed values shown in the error message above so that we can simply use JsonPath.string_at("States.MathAdd($.successful_count, 1)").
Other Information
No response
Acknowledgements
CDK version used
2.47.0
Environment details (OS name and version, etc.)
Windows 11 and Amazon Linux
The text was updated successfully, but these errors were encountered: