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

fix(aws-lambda): add missing version field into aws gateway compatible payload #13018

Merged
merged 3 commits into from
May 15, 2024

Conversation

windmgc
Copy link
Contributor

@windmgc windmgc commented May 13, 2024

Summary

This PR adds a missing version field into the aws-lambda plugin's awsgateway_compatible payload.

The awsgateway_compatible field provides a way to send a wrapped request body which is compatible with the format of AWS API gateway's proxy integration. The format of the payload is described here: https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html#http-api-develop-integrations-lambda.proxy-format

Some framework/projects that used to build Lambda function may check the version field sent by API gateway, so that they can apply different extracting logic according to different versions of payload. For example the logic in mangum looks like: https://github.com/jordaneremieff/mangum/blob/6086c268f32571c01f18e20875430db14a0570bc/mangum/handlers/api_gateway.py#L157-L176

The PR adds the missing version field for better compatibility.

Checklist

  • The Pull Request has tests
  • A changelog file has been created under changelog/unreleased/kong or skip-changelog label added on PR if changelog is unnecessary. README.md
  • There is a user-facing docs PR against https://github.com/Kong/docs.konghq.com - PUT DOCS PR HERE

Issue reference

FTI-5949

@github-actions github-actions bot added plugins/aws-lambda cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels May 13, 2024
…n-field.yml

Co-authored-by: Yufu Zhao <ms2008vip@gmail.com>
@windmgc windmgc merged commit 204dd8d into master May 15, 2024
25 checks passed
@windmgc windmgc deleted the fix-aws-lambda-add-missing-version branch May 15, 2024 02:25
@team-gateway-bot
Copy link
Collaborator

Successfully created cherry-pick PR for master:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee plugins/aws-lambda size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants