Comments (3)
Just to provide a bit more context to @kmulka-bloomberg's question, response streaming is supported by lambda since mid 2023: https://aws.amazon.com/blogs/compute/introducing-aws-lambda-response-streaming/
from mangum.
@rdettai response streaming is supported with NodeJS runtime only, according to your link. :)
And upping the size from 6MB to 20MB looks hilarious.
from mangum.
response streaming is supported with NodeJS runtime only
You're right! At the time they released the feature they only added support for it in the Node runtime. Pretty weird! It is supported in other SDKs now, such as Rust. It should also be doable in Python but strangely I couldn't find any reference about that.
upping the size from 6MB to 20MB looks hilarious
Yes, pushing the limit a few megabytes further is only a minor improvements on that front as you'll probably still need some sort of offloading through S3 for larger responses anyway. Note that the 20MB limit is a soft limit (at least when your not running through API Gateway). It means you can increase it by contacting the support. But it's probably not a very good idea as payloads above 6MB are throttled to 2MBps.
Note that the benefit of having a streamed response is not just for transferring larger payloads, it's also interesting to
- reduce "time to first byte"
- some exotic workloads, e.g a Lambda that performs highly selective search across a massive dataset: you might be interested to get the search results as they come in to have a more interactive UI on the caller side (again, not compatible with API Gateway 😢)
from mangum.
Related Issues (20)
- Support for S3 Events HOT 3
- AWS lambda function not identify the handler in FastAPI project
- FYI: documentation is not available at mangum.io HOT 4
- Question: How does one keep state between AWS Lambda cold starts? HOT 5
- How To: How to form SQS event to look like REST body as if coming from API Gateway HOT 1
- Problems with Sanic 23.3.0 and Mangum 0.17.0 HOT 5
- Wrong domain when using AWS Lambda FunctionUrls and CloudFront with FastAPI
- Handle comma separated X-Forwarded-port
- SQS message not returned back to the topic HOT 1
- FastAPI redirects to wrong host with Mangum HOT 2
- Doesn't work with Lambda in Docker locally HOT 2
- Mangum breaks Django POST with multipart/form-data; HOT 2
- `OSError` in Vercel Serverless Functions deployment
- Official support for Python 3.11 and Python 3.12? HOT 1
- `Request.url` does not include the api_gateway_base_path
- VPC Lattice event support
- Dealing with long running client HOT 4
- mangum.io Domain Expired HOT 2
- Support lifespan state
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mangum.