I am fairly new to serverless framework (sls) and trying to define a function and deploy it to AWS.
While declaring a function in serverless.yml, I have defined the necessary parameters for a function along the lines of the following snippet but I am not able to define an optional query parameter in the http path of the new function:
function-name:
handler: path/to/js/file.handler
events:
- http:
path: api/v1/resource/{limit}
method: GET
Desired behavior: The issue is that I am not able to declare an optional parameter in the path. I wish the endpoint would work as expected even if the limit parameter in not passed in the http GET request.
Note: I have tried path: api/v1/resource/{limit?} but no luck.