Can you define a URL Query String Parameter for a get request?

Dax,

Thank you for the through explanation. I do understand that serverless is attempting to automate the APIG configuration that I would otherwise do manually. I’m viewing the APIG in the AWS console after each deployment.

I fixed the indentation, as you suggested, but (re)deploying the function still does not change the request body mapping template in the API Gateway. The function definition now looks like:

functions:
  hello:
    handler: handler.hello
    events:
      - http: GET hello
    request:
      template:
        application/json: '{ "foo" : "$input.params(''foo'')" }'

Under /hello > GET > Integration Request > Body Mapping Templates I see that the default templates are still in use.

  • application/json
  • application/x-www-form-urlencoded

It seems that my request template is ignored. Could this be a bug? I will try to create a new function/HTTP event using the same request template in the serverless.yml and see if updating an existing mapping template is the issue.

I’m using the latest serverless (v1.0.0-rc.2).

Thank you for your replies.

-Nick