On my api I have a route with a path parameter: api.com/item/{id} I cannot generate the path directly from the stpefunction. I tried to concatenate the static part and the dynamic part using the intriseque function but I got this error: Reference path didn't start with '$' and I did not find any parameter to enter a path parameter in the doc
{
"Comment": "Stepfunction",
"StartAt": "Generate random ID",
"States": {
"Generate random ID": {
"Type": "Task",
"Resource": "${GetRandomFunctionArn}",
"ResultPath": "$",
"Next": "Get item"
},
"Get item": {
"Type": "Task",
"Resource": "arn:aws:states:::apigateway:invoke",
"Parameters": {
"ApiEndpoint": "${APIBaseUrl}",
"Method": "GET",
"RequestBody": {},
"AuthType": "NO_AUTH",
"Stage": "${APIStage}",
"Path": "States.Format(${EndpointProductAvailability}/{}, $.item_id)"
},
"End": "True"
}
}
}
The stepfunctin is part of a sam application.
How to make an api call with one part which is an input variable and the rest which is generated by a previous task?
"Path.$": "States.Format(${EndpointProductAvailability}/{}, $.item_id)".