Search code examples
aws-step-functions

AWS Step Functions: calling API Gateway endpoint with URL parameter is ignored


In Step Functions workflow, I have a state in which I am trying to call an API endpoint /v1/map?json=1 but the problem is json=1 is not getting picked up. It appears only /v1/map gets passed checking the CloudWatch Logs.

    {
      "Type": "Task",
      "Resource": "arn:aws:states:::apigateway:invoke",
      "Parameters": {
        "ApiEndpoint": "asdf.execute-api.us-east-1.amazonaws.com",
        "Method": "POST",
        "Stage": "dev",
        "Path": "/v1/map?json",
        "Headers": {
          "Accept": [
            "application/json"
          ]
        },
        "Stage": "dev",
        "AuthType": "IAM_ROLE"
      },
      "Next": "Lambda Invoke",
      "ResultPath": "$.myStateInput"
    }

Is passing URL parameters not supported? What happens if I don't pass any value to isJson and just do ?isJson would that also get ignored?


Solution

  • Query Paramaters are accepted, just not as part of the Path:

    "QueryParameters": {
        "json": ["1"]
    },