I want a sample to integrate AWS API Gateway with Step Function. I have read this tutorial Creating a Step Functions API Using API Gateway but that tutorial needs me to send
Create your API Gateway resource and method. Then in the "Method Execution" settings, in the Integration Request, use these settings:
Then the magic. Futher down, under Body Mapping Templates:
Futher down in the template text box:
#set($input = $input.json('$'))
{
"input": "$util.escapeJavaScript($input)",
"stateMachineArn": "arn:aws:states:eu-west-1:123456789012:stateMachine:yourStepFunctionName"
}
This will pass the json payload posted to API Gateway through to the Step Function.
Omit the execution name so that each call to API Gateway creates a new execution.