I am currently stuck with a request passthrough. I need to process information from the header as well as from the body of a request with a step function pipeline. I am using a REST API Gateway that has in the integration request the following mapping template
#set($data = $util.escapeJavaScript($input.json('$')))
{
"input": "{ \"input\": $data, \"stageVariables\" : { #foreach($key in $stageVariables.keySet()) \"$key\" : \"$util.escapeJavaScript($stageVariables.get($key))\" #if($foreach.hasNext),#end #end } }",
"stateMachineArn": "arn:aws:states:eu-west-1:xxxxxxxxxxxx:stateMachine:StateMachine-1"
}
But this does not work. If I would access the header with a lambda event it would be event['headers']['Authorization'] But I only get the body of my request as input to my step function.
When I use the Data Flow Simulator with my whole request and then take the JsonPath into my state machine template, it still does not give me the header and body as input.
Can someone please help me out here?