Skip to content

Add support for streaming responses in api gateway#142

Merged
mnapoli merged 3 commits intooss-serverless:mainfrom
andidev:feature/transferModeStream
Apr 6, 2026
Merged

Add support for streaming responses in api gateway#142
mnapoli merged 3 commits intooss-serverless:mainfrom
andidev:feature/transferModeStream

Conversation

@andidev
Copy link
Copy Markdown
Contributor

@andidev andidev commented Feb 9, 2026

This adds support for "Amazon API Gateway Streaming REST apis"
Feature was released in AWS around Nov 19, 2025 and is helpful when developing serverless lambda AI APIs and apis that take longer than the API Gateway timeout limit of 29 seconds.

see https://aws.amazon.com/about-aws/whats-new/2025/11/api-gateway-response-streaming-rest-apis/

@andidev
Copy link
Copy Markdown
Contributor Author

andidev commented Feb 9, 2026

I have already added support for serverless-offline project. I still need to fine tune the implementation and agree with the repo owners of the serverless-offline project to add support for it.
Not sure how they handle/want to handle the serverless v3 fork situation.

PR is created at least, see dherault/serverless-offline#1871

@andidev andidev force-pushed the feature/transferModeStream branch from f83092c to e8f9f43 Compare February 10, 2026 23:30
@jernaumorat
Copy link
Copy Markdown

Keen to know what is blocking this being merged; we have a few places where this is now needed and have very janky workarounds in place

@Arit143
Copy link
Copy Markdown

Arit143 commented Apr 1, 2026

bumping it +1

@mnapoli
Copy link
Copy Markdown
Contributor

mnapoli commented Apr 3, 2026

Hey everyone, the status is red

@andidev
Copy link
Copy Markdown
Contributor Author

andidev commented Apr 3, 2026

It is fixed now, was a small eslit rule causing it.
@mnapoli can you approve so checks run again?

I see though that there is some usage of ?. in code that fails in main branch since the min allowed node version is set to 12.
Think we should change to enforce at least node 14 to allow optional chaining in projects or actually change code to work for node 12.
At least locally I get eslint issues pointing to

const objects = result?.Contents?.filter(({ Key: key }) =>

@mnapoli
Copy link
Copy Markdown
Contributor

mnapoli commented Apr 6, 2026

Thanks!

And yes we can bump to Node 14 👍

@mnapoli mnapoli merged commit 946da3b into oss-serverless:main Apr 6, 2026
3 checks passed
@buddhaCode
Copy link
Copy Markdown

Are there any caveats using a steam response? Sounds like this feature is like paradise on earth. Timeouts up to 15 min and response size over 10MB?

@andidev
Copy link
Copy Markdown
Contributor Author

andidev commented Apr 7, 2026

I think no. Pricing is around the same as well (long time ago I checked it though)
Only thing is you need to change the implementation in the handler some and also on client side. It is a bit more tricky to manage the errors maybe.
Check with an AI.

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.

5 participants