I have a java application written using spring-cloud-functions and deployed in aws lambda which connects to aws api-gateway
I have a 'GET' api(let's say /employees/{employeeId}
) which takes an input parameter({employeeId} in this case) and returns the result(employee details for the given employeeId) corresponding to the parameter.
I tried googling but could not find a way to set this up such that I get the {employeeId} passed to my spring-cloud-function code and act accordingly. How do I get the parameter in the java code?
Can anyone suggest how to set this up in api-gateway and get the same parameter in my java lambda code?
Thanks.
I used REST API with lambda integration. We need to convert the path params and query params to an event object that the lambda can consume.
So here goes, in integration tab:
You can refer here for details: AWS Knowledge Centre Article
Same logic can be applied to path params as well.