I'm creating an aws lambda function using VS Code aws plugin, the language is nodeJS.
I need to pass a dynamic id in the request preferably as part of the path.
In nodeJS express I would do it something like this
/api/route/:id
However when I try to do this in my lambda function's template.yaml like this
Events:
HelloWorld:
Type: Api # More info about API Event Source: https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md#api
Properties:
//***** this line
Path: /api/route/:id
Method: get
It does'n work
Any help would be appreciated
P.S. I'm able to pass it as a query param like so
https://awslambdafunction.com/api/route/?id=1234
It does work but I would really like to have it as part of the path itself like this
https://awslambdafunction.com/api/route/1234