It is not generating the path parameters in the Cloudformation file. So the AWS SDK is not generated correctly and no params are included in the generated sdk.
Am I doing something wrong or is this a bug in serverless?
I’ve never tried to define the variables in the path and request properties at the same time (although I can see where you got the example from in the docs).
tanks for your answer.
I have done this before.
The lambda functions are working this way but AWS then doesn’t have the path parameters in the generated SDK.
Sorry, I don’t understand what you mean by “generated SDK”.
If you go to /users/test do you see the value “test” in the event.pathParameters.id property? If so, then path parameter is being mapped to the variable defined.
resources:
Resources:
# The following are workarounds for the current inability to define querystrings while using
# lambda-proxy integration.
# Be sure to remove them once it's been fixed or a plugin has been developed!
# And be sure to add any new querystring-needing functions here ...
# you get their full name out of .serverless/cloudformation-template-update-stack.json:
ApiGatewayMethodNotificationsDeviceidVarDelete:
Properties:
RequestParameters:
method.request.path.deviceId: true