-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Open
Description
Is there an existing issue for this?
- I have searched the existing issues
Kong version ($ kong version)
3.10
Current Behavior
Setting option awsgateway_compatible = true I expected to receive the event payload in the lambda function strictly equal from AWS API Gateway and Kong + AWS Lambda Plugin.
Although, Kong creates resource property with literal matching values and AWS API Gateway set it to the defined resource route itself instead.
Using Kong the event resource property is is:
resource: /site/my-site-slug-123
Expected Behavior
But to be fully compatible with AWS API Gateway, the event resource property should be:
resource: /site/{siteSlug}
Steps To Reproduce
- Create a simple lambda function to console.log(event)
export const handler = async (event) => {
console.log(event);
}- Integrate it to AWS API Gateway using a route with path template variables
- Call it through API Gateway and confirm
event.resource. It should be likeresource: /site/{siteSlug}. - Configure a Route + AWS Plugin in Kong using expressions, e.g.
http.path ~ "^/sites/(?<siteSlug>[^/]+)"*. (I tested other operators and regex patterns). - Call it using Kong and confirm
event.resource. It should be likeresource: /site/my-site-slug-123.
* using named capturing groups was the closest I got to have named
pathParameters.
Anything else?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels