- Newest
- Most votes
- Most comments
Step Functions does not support JSONata's $eval. For that reason, we added $parse, as a special Step Functions function to parse a JSON String into a JSON Object. You can see this in the doc.
It appears that you're encountering an issue while trying to use the $eval function in JSONata within AWS Step Functions. Unfortunately, AWS Step Functions does not support all JSONata functions, and $eval is likely one of the unsupported functions.
While $eval is not available, there are alternative approaches you can use in AWS Step Functions to transform a JSON string into a JSON object using JSONata:
-
If you know the structure of your JSON string, you can use JSONata's parsing capabilities directly. For example, if your JSON string is stored in a variable called $jsonString, you could try:
$parse($jsonString)
-
If the JSON string is already valid JSON, you might not need to use any special function. JSONata in Step Functions should automatically parse it when you reference it.
-
You can use the built-in JSON parsing capabilities of Step Functions. Instead of using JSONata for this specific task, you could use a Pass state with Parameters to parse the JSON string.
-
If none of these methods work for your specific use case, you might need to consider using a Lambda function to perform the JSON string to object conversion.
Remember, when using JSONata in AWS Step Functions, you need to opt-in by setting the QueryLanguage field to JSONata in your workflow definition. This replaces the traditional InputPath, Parameters, ResultSelector, ResultPath, and OutputPath fields with Arguments and Output fields that use JSONata expressions.
If you continue to face issues, it might be helpful to share more details about your specific JSON string and the exact transformation you're trying to achieve. This would allow for more tailored suggestions within the constraints of AWS Step Functions and its implementation of JSONata.
Sources
Transforming data with JSONata in Step Functions - AWS Step Functions
Simplifying developer experience with variables and JSONata in AWS Step Functions | AWS Compute Blog
AWS Step Functions simplifies developer experience with Variables and JSONata transformations - AWS
Relevant content
- asked 3 months ago
- asked 6 months ago
- asked 9 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 3 years ago

Missed that. Thank you!