Is there an existing issue for this?
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 like resource: /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 like resource: /site/my-site-slug-123.
* using named capturing groups was the closest I got to have named pathParameters.
Anything else?
No response
Is there an existing issue for this?
Kong version (
$ kong version)3.10
Current Behavior
Setting option
awsgateway_compatible = trueI expected to receive the event payload in the lambda function strictly equal from AWS API Gateway and Kong + AWS Lambda Plugin.Although, Kong creates
resourceproperty with literal matching values and AWS API Gateway set it to the defined resource route itself instead.Using Kong the event
resourceproperty is is:resource: /site/my-site-slug-123Expected Behavior
But to be fully compatible with AWS API Gateway, the event
resourceproperty should be:resource: /site/{siteSlug}Steps To Reproduce
event.resource. It should be likeresource: /site/{siteSlug}.http.path ~ "^/sites/(?<siteSlug>[^/]+)"*. (I tested other operators and regex patterns).event.resource. It should be likeresource: /site/my-site-slug-123.Anything else?
No response