-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(aws-lambda) support for Lambda Proxy Integration
Summary ------- Previously, Kong would return a 200 or 202 no matter what the Lambda function responded with. Now, a Lambda function can now return an object that sets a custom HTTP status code, headers, and body. Kong will use these values to override the response sent back to the client. This new behavior brings Kong to parity with AWS API Gateway and will make migrating from that platform much easier. Read more on Lambda Proxy Integration here: https://docs.aws.amazon.com/apigateway/latest/developerguide/getting-started-with-lambda-integration.html The supported response format from the Lamda is: { "statusCode": 201, "headers": { "headerName": "headerValue", ... }, "body": "..." } Changes ------- * Add `is_proxy_integration` option to schema (disabled by default). When enabled, the behavior described above will be in effect. * Invalid response formats will result in a 502 response from Kong. * Add test cases for returning a custom response from Lambda. NYI --- Not yet implemented: * Support for `isBase64Encoded` See --- From #3427 Signed-off-by: Thibault Charbonnier <[email protected]>
- Loading branch information
1 parent
6257b24
commit c6f9e45
Showing
4 changed files
with
313 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters