How to get the path param value in java AWS Lambda function

情到浓时终转凉″ 提交于 2019-12-12 04:32:38

问题


URL: /test/{userName}

In AWS Lambda function, How can I get the {username} path parameter value. I am calling lambda function through AWS API gaetway.


回答1:


If you are using AWS integration type:

Use a mapping template to send $input.params('username') property in the request body to your Lambda function.

If you are using AWS_PROXY integration type:

You can access the path parameters via the "pathParameters" property of the incoming event.



来源:https://stackoverflow.com/questions/41762462/how-to-get-the-path-param-value-in-java-aws-lambda-function

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!