Skip to content

Conversation

@DiscreteTom
Copy link

@DiscreteTom DiscreteTom commented Jun 6, 2024

Summary

Make the aws-lambda plugin to support Lambda response streaming.

Moved from #13171 due to the branch is renamed to fit the naming scheme.

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

Fix #[issue number]

@github-actions github-actions bot added plugins/aws-lambda schema-change-noteworthy cherry-pick kong-ee schedule this PR for cherry-picking to kong/kong-ee labels Jun 6, 2024
@tysoekong
Copy link
Contributor

tysoekong commented Jun 6, 2024

Here @DiscreteTom is the updated SDK: Kong/lua-resty-aws#119

If you use this newer version of the SDK, you should receive an extra table param back from the AWS execute function body_reader which comes from the res object.

You can use this to read each chunk back to the client. Decode of the chunk is still manual, because it is a bit more rework to turn execute_request into a weird optional iterator.

Does this work for your Lambda plugin enhancement so far?

@bnusunny
Copy link

Any update on this PR?

@gustoliv
Copy link

It would be great to have this merged. Currently, we dont have a way to invoke a Lambda function using the response streaming model, and with the increasing adoption of GenAI and chat models, having this capability without needing to create additional components, such as exposing Lambda through the AWS API Gateway, would be incredibly helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants