Im creating a POC with nested Step Functions (SF) and have hit the following issue.
Is there something im missing or a recommended approach to this scenario? I could "process" the escaped json string in a lambda or something but using it in the Choice task... but that kinda defeats the point of the nested SF workflow somewhat.
Any help appreciated.
To get the function output from a Step Function, you have to add a second method in API Gateway which will call the Step Function with the DescribeExecution action. The API Gateway client will have to call this periodically (poll) until the returned status is no longer "RUNNING".
You can give AWS Step Functions initial input data by passing it to a StartExecution action when you start an execution, or by passing initial data using the Step Functions console . Initial data is passed to the state machine's StartAt state. If no input is provided, the default is an empty object ( {} ).
Use the ResultSelector field to manipulate a state's result before ResultPath is applied. The ResultSelector field lets you create a collection of key value pairs, where the values are static or selected from the state's result.
Not sure it's new since you asked the question but the answer is in the link you provided: Use "arn:aws:states:::states:startExecution.sync:2" in the task resource field instead of "arn:aws:states:::states:startExecution.sync"
I ran into the same issue. I used "OutputPath": "$.Output" at first and that returned the escaped json. I removed that and added "ResultPath": "$.Output", This works, it returns the output as json including the escaped version. Its ok for now until AWS addresses this.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With