-
Notifications
You must be signed in to change notification settings - Fork 101
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
Support Lambda Streaming #229
Conversation
@gpotter2 I see you reviewed my other PR, so i'm tagging you here. Do you think someone will get to review this within the next weeks? It'd be good to have this functionality for usage in the Netlify CLI, and if this takes a while to be reviewed then i'll publish & use my fork in the meantime. |
@Skn0tt Thanks for the ping. The PR looks good, so I'll merge it and make a release ASAP. |
@@ -0,0 +1,55 @@ | |||
import { PassThrough } from "stream"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: would you mind adding a docstring to this file explaining what it does and linking to https://aws.amazon.com/fr/blogs/compute/introducing-aws-lambda-response-streaming/ ? Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea! Done in 4acb177.
Wow, thanks for the quick response! Addressed your nit. |
@gpotter2 I'd love to use this. If there's anything missing from this PR that I can help, please let me know. Thanks in advance! ❤️ |
@gpotter2 Thanks for merging! Would you be open to using an automated flow for publishing to npm, so you don't have to be pestered to trigger it manually? I'd be happy to help put that together. |
Hi guys. Sorry for the giant delay.
😢
As much as I'd like to be able to answer "Nah, I prefer to do it manually.", this would probably reduce such delays. If it's not too much work this would be appreciated. Cheers and happy summer |
Absolutely! Our team's plate is full right now, but I put it in our backlog and hope we'll get to open that PR in the coming days/weeks :) |
AWS launched support for HTTP Streaming in Lambda a couple of days ago: https://aws.amazon.com/blogs/compute/introducing-aws-lambda-response-streaming/
This PR adds support for this to
lambda-local
. It polyfills the two globalsawslambda.streamifyResponse
andawslambda.HttpResponseStream.from
, and makes it so thatexecute
returns aReadableStream
asbody
, if streaming is used.I'll leave support for
watch
to a separate PR, so we can keep this one small.