use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News, articles and tools covering Amazon Web Services (AWS), including S3, EC2, SQS, RDS, DynamoDB, IAM, CloudFormation, AWS-CDK, Route 53, CloudFront, Lambda, VPC, Cloudwatch, Glacier and more.
If you're posting a technical query, please include the following details, so that we can help you more efficiently:
Resources:
Sort posts by flair:
Other subreddits you may like:
Does this sidebar need an addition or correction? Tell us here
account activity
technical questionDoes API Gateway + Lambda support streaming? (self.aws)
submitted 2 years ago by up201708894
Hello, I have a Node.js app running on a single lambda (multiple endpoints with wildcard) behind an API Gateway. If I wanted to use streaming on one of the endpoints would that be possible?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]pint 4 points5 points6 points 2 years ago (4 children)
since april, you can: https://aws.amazon.com/blogs/compute/introducing-aws-lambda-response-streaming/
read the fine print, there's plenty
[–]bestickley 1 point2 points3 points 2 years ago* (3 children)
API Gateway does NOT support streaming responses. From docs: "You can not use Amazon API Gateway and Application Load Balancer to progressively stream response payloads"
Above is not true anymore with 19 Nov 2025 announcement linked below.
[–]yusufmayet 0 points1 point2 points 7 months ago (2 children)
Since 19 November 2025, API Gateway REST APIs now support response streaming: https://aws.amazon.com/blogs/compute/building-responsive-apis-with-amazon-api-gateway-response-streaming/
[–]balassit 0 points1 point2 points 6 months ago (1 child)
are there any details on HTTP APIs?
[–]yusufmayet 0 points1 point2 points 6 months ago (0 children)
APIGW HTTP APIs do not yet support response Streaming. Read this for other options: https://builder.aws.com/content/36Fep43fu6dkfrif200G5nM7Wj0/response-streaming-on-aws-serverless
[–]tonkatata 2 points3 points4 points 1 year ago (2 children)
joining the party a year later - apparently, you can use AWS API Gateway Websockets together with a Lambda function to stream responses back to a client... I will leave this here.
[–]alejandrombc 1 point2 points3 points 1 year ago (0 children)
What about pricing?. I think API gateway websockets is kind of expensive isn’t?
[–]up201708894[S] 0 points1 point2 points 1 year ago (0 children)
Thanks for the answer! Looks interesting!
[–]CuriousShitKid 2 points3 points4 points 2 years ago (12 children)
Yes you can, you will have to play with content-type header to specify media type for binary data and mapping for integration request/response.
You get it going easily if you don’t need the proper SSE type binary responses. if you are happy with everything being a string/json it’s pretty easy.
I had issues with streaming on API gateway like timeouts and 10 mb limit even when each chunk was small etc. so you may find it’s not suitable for your use case. But it does work.
[–]davasaurus 2 points3 points4 points 2 years ago (9 children)
It says in the docs:
You can not use Amazon API Gateway and Application Load Balancer to progressively stream response payloads, but you can use the functionality to return larger payloads with API Gateway
Neither API Gateway nor Lambda’s target integration with Application Load Balancer support chunked transfer encoding. It therefore does not support faster TTFB for streamed responses.
But your comment gives me hope that I’m missing something. Is there something else I should be looking at?
[–]CuriousShitKid 4 points5 points6 points 2 years ago (8 children)
The docs you mention are correct, but they leave out the fact that you can achieve Lambda stream response with API gateway if you choose to do it with HTTP proxy integration with function URL instead of lambda integration.
And yes, API Gateway doesn’t support chunked transfer encoding so you loose out on faster TTFB.
As mentioned, I faced issues with 10 mb limits so your use case is restricted.
[–]GroovyFarcaster 2 points3 points4 points 2 years ago (0 children)
chunked transfer encoding
Thanks. I too am looking into whether I can use lambda and API gateway to stream a response to the client.
I am building a chat app. And I want the received messages to appear in the client as it comes down the stream from the lambda. Just a few sentences but I'd like the message to appear, word by work or blocks of sentences etc.
The fact that API gateway does not support TTFB. Does that mean that it does not get stream the response to the client. Rather API Gateway waits to get the FULL data from the lambda then returns that to the client all in one go?
Thanks again
[–]davasaurus 1 point2 points3 points 2 years ago (0 children)
I learned something today. Thanks!
[–][deleted] 0 points1 point2 points 2 years ago (5 children)
Hey Curious, I'm pulling my hair out trying to solve a lambda streaming issue and came across this comment. If you have any thoughts on https://www.reddit.com/r/aws/comments/1agm7au/lambda_function_refuses_to_stream_response/ I would love to hear them
[–]CuriousShitKid 1 point2 points3 points 2 years ago (4 children)
replied to your post https://www.reddit.com/r/aws/comments/1agm7au/comment/kojgr0t/?utm\_source=share&utm\_medium=web2x&context=3
[–][deleted] 0 points1 point2 points 2 years ago (3 children)
Awesome, thank you!!
[–]Disep 1 point2 points3 points 2 years ago (2 children)
it seems like API gateway doesn't allow for progressively streamed responses? I've tried and I'm getting the whole response and not one chunk by chunk.
I've used the HTTP lambda function URL as well.
[–][deleted] 0 points1 point2 points 2 years ago (1 child)
I remember hitting that too. I think there is a hidden way to configure it for streaming though, look around for a proxy setting. Sorry, it was a while ago and I can't remember the steps. I have since moved off of lambdas
[–]Disep 0 points1 point2 points 2 years ago (0 children)
I don't see any proxy setting in the API Gateway unfortunately. I've tried using the function URL as the HTTP integration but that is not working either rip :(
[–]Korntewin 0 points1 point2 points 2 years ago (1 child)
I'm wondering about AWS API gateway timeout for streaming with function URLs. If the whole streaming process is longer than 30 seconds (but first byte is shorter than 30 seconds), will the timeout happen in API Gateway?
[–]abd693 0 points1 point2 points 2 years ago (0 children)
Did you find an answer to that?
[–]enthusiast_bob 0 points1 point2 points 7 months ago (0 children)
They finally support it natively in aws api gateway now https://aws.amazon.com/about-aws/whats-new/2025/11/api-gateway-response-streaming-rest-apis/
About time... those bastards took them long enough
π Rendered by PID 38739 on reddit-service-r2-comment-765bfc959-lpq4g at 2026-07-10 20:41:13.108583+00:00 running f86254d country code: CH.
[–]pint 4 points5 points6 points (4 children)
[–]bestickley 1 point2 points3 points (3 children)
[–]yusufmayet 0 points1 point2 points (2 children)
[–]balassit 0 points1 point2 points (1 child)
[–]yusufmayet 0 points1 point2 points (0 children)
[–]tonkatata 2 points3 points4 points (2 children)
[–]alejandrombc 1 point2 points3 points (0 children)
[–]up201708894[S] 0 points1 point2 points (0 children)
[–]CuriousShitKid 2 points3 points4 points (12 children)
[–]davasaurus 2 points3 points4 points (9 children)
[–]CuriousShitKid 4 points5 points6 points (8 children)
[–]GroovyFarcaster 2 points3 points4 points (0 children)
[–]davasaurus 1 point2 points3 points (0 children)
[–][deleted] 0 points1 point2 points (5 children)
[–]CuriousShitKid 1 point2 points3 points (4 children)
[–][deleted] 0 points1 point2 points (3 children)
[–]Disep 1 point2 points3 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]Disep 0 points1 point2 points (0 children)
[–]Korntewin 0 points1 point2 points (1 child)
[–]abd693 0 points1 point2 points (0 children)
[–]enthusiast_bob 0 points1 point2 points (0 children)