Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(aws-lambda) add static response template to optionnaly match #3729

Closed
wants to merge 1 commit into from

Conversation

romdsj
Copy link

@romdsj romdsj commented Aug 28, 2018

Summary

Allow lambda's response to set statusCode and add headers to Kong's output response.

If Content-Type is "application/json" and response from AWS Lambda match the following JSON :
{
status_code: <my_status_code>,
body: <my_json_encoded_body>,
headers: <my_headers>
}
Then the response from Kong will set the statusCode value to <my_status_code> and the body to <my_json_encoded_body> and add <my_headers> to response

Full changelog

  • kong/plugins/aws-lambda/handler.lua

Issues resolved

Fix #3208

 
Allow lambda's response to set statusCode and add headers to Kong's output response.

If Content-Type is "application/json" and response from AWS Lambda match the following JSON :
{
  status_code: <my_status_code>,
  body: <my_json_encoded_body>,
  headers: <my_headers>
}
Then the response from Kong will set the statusCode value to <my_status_code> and the body to <my_json_encoded_body> and add <my_headers> to response

From Kong#3208
@romdsj romdsj force-pushed the feat/aws-lambda-status-code-res branch from ee8d9d4 to f899932 Compare August 28, 2018 16:28
@thibaultcha
Copy link
Member

Hi,

Thank you for the patch. However, it seems like it is a duplicate of #3427?

@romdsj
Copy link
Author

romdsj commented Aug 28, 2018

Oh ... Sorry I missed that. I close this PR

1 similar comment
@romdsj
Copy link
Author

romdsj commented Aug 28, 2018

Oh ... Sorry I missed that. I close this PR

@romdsj romdsj closed this Aug 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AWS Lambda Handled Exceptions
2 participants