I need to pass a path param in the API.
By using the mapping template, I am able to pass query params and use them in the function.
Mapping template:
{ "Id": "$input.params('Id')" //this works fine after passing params as <url>?param=vale } With reference to this I created the mapping template as following-
{ "Id": "$input.params().querystring.get('Id')" // requirement is to be able to use <url>/value } I tried using 'Method request template' under genrate template, but it didn't work either.
When I invoke the URL urlname.execute-api.us-east-2.amazonaws.com/stag/functionname, it gives the value as undefined.
This is how I'm using the param:
class Lambda { static run(event, context, callback) { callback(null, 'Id '+ event.Id); } } module.exports = Lambda; Also, please tell me how to use those params in code. Be kind :)




Lambda Proxy?