lambda-api
lambda-api copied to clipboard
API Gateway Prefix
trafficstars
Hello,
Im not sure if this is an issue or if I have a setup issue, but if I do a domain mapping on API gateway then the paths no longer work correctly.
Example would be:
api.company.com/users -> maps to API gateway user service
api.get("/:userId", ....
then you call https://api.company.com/users/<some user id> , it will throw a route not found error.
I am also seeing an issue passing in parameters. GET calls with no parameters work fine. With a parameter is failing. I get a 405 Method not allowed when calling these routes
Do you need to declare the variable?
api.get("/:userId/:userid
Then get it from either the req.params or req.query?