- Newest
- Most votes
- Most comments
Hello,
Thank you for reaching out to us and sharing the detailed use-case.
The correct mapping parameter to overwrite the path would be as below :
/$request.path.proxy
Using "$request.path.proxy+" will give you "/v1/app1/user/add" as path as it is a catch all greedy path variable. This can be verified using context variable $context.path in access logging.
The correct way is using "$request.path.proxy" [1] which will give you the value "user/add" as path for the integration which is partially correct as it will throw 4xx error at the backend due to the missing initial "/".
Therefore, using "/$request.path.proxy+" will give you the proper value "/user/add" as path output which is suits your use-case. Please let me know if you still face any issues after implementing my above suggestion.
References: [1] https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-http.html
Relevant content
- asked 5 months ago
- asked 7 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a year ago
Many thanks! BTW, I think there is a typo: 'Therefore, using "/$request.path.proxy+" will give you the proper value "/user/add"' should be 'proxy', not 'proxy+'.