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

Implement Lambda response transformation to API Gateway format #1927

Open
wants to merge 2 commits into
base: feature/lambdatesttool-v2
Choose a base branch
from

Conversation

gcbeattyAWS
Copy link

@gcbeattyAWS gcbeattyAWS commented Jan 9, 2025

Issue #, if available: DOTNET-7861

Description of changes:
This PR introduces functionality to transform AWS Lambda InvokeResponse objects into API Gateway compatible response formats. The implementation adds support for REST API, HTTP API v1, and HTTP API v2 response formats.

This change is needed because API gateway has additional conversion logic in some cases when converting lambda memory stream to the api gateway response object, as described in https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-lambda.html

This change does not implement handing the LambdaResponse.FunctionError case, for when the lambda itself failed. I think that should be handled separately.

I have ran all unit tests and integration tests locally and it passed

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@gcbeattyAWS gcbeattyAWS changed the title Title: Implement Lambda response transformation to API Gateway format Implement Lambda response transformation to API Gateway format Jan 9, 2025
@gcbeattyAWS gcbeattyAWS marked this pull request as ready for review January 9, 2025 17:24
@gcbeattyAWS gcbeattyAWS requested review from normj and philasmar January 9, 2025 17:24
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.

3 participants