Kong Lambda Plugin - Use as proxy?

Hi everyone.

I am using the Kong Lambda plugin, I have a case where I want to route based on some complex logic. However, I do not want the lambda to make the request to the upstream due to the amount of requests that would be sent and also the potential response times.

I have been able to follow the approach I want with AWS Cloudfront where the edge lambda determines the upstream to use and the routing can be defined by the output of the lambda. So effectively the pattern would be the lambda receives the request with all the standard request information. The Lambda then runs its complex logic, then returns a JSON object which contains the matching service and route the request should use when processed by kong.

Is there a way of doing this with Kong?

Hello dom2497 - Did you find a way to resolve this. ?