1

How can I define the path in serverless.yml with more than one query parameter using HTTP API (API Gateway v2) so that the endpoint looks like the following:

https://example.com/rest/endpoint?id=$id&tag=$tag

serverless.yml

 dfsPostback: 
    handler:  handlers/result.main 
    events:
      - httpApi:
          path: /dfs-pingback  // need help here 
          method: get

I tried with

path: /dfs-pingback?id={id}&tag={tag}

deployment failed

Ben Jonson
  • 565
  • 7
  • 22
  • you dont need to specify query strings in the path. however path parameters will need to. they. will be sent in the event object – cmgchess Jul 05 '22 at 06:54

1 Answers1

2

There is no need to specify the query parameters in the path. You should be able to access all passed query params in your event handler.

pgrzesik
  • 1,869
  • 13
  • 14