- Newest
- Most votes
- Most comments
Hello.
Looking at the documentation below, it appears that Node.js natively supports response streaming, but for other languages you will need to use a custom runtime or Lambda Web Adapter.
https://docs.aws.amazon.com/lambda/latest/dg/configuration-response-streaming.html
Lambda supports response streaming on Node.js managed runtimes. For other languages, you can use a custom runtime with a custom Runtime API integration to stream responses or use the Lambda Web Adapter. You can stream responses through Lambda Function URLs, the AWS SDK, or using the Lambda InvokeWithResponseStream API.
In the case of Lambda Web Adapter, there is sample code on GitHub, so you can refer to it.
https://github.com/awslabs/aws-lambda-web-adapter/tree/main/examples/fastapi
In additional to the answer above, here is a FastAPI response streaming example with Lambda Web Adapter.
https://github.com/awslabs/aws-lambda-web-adapter/tree/main/examples/fastapi-response-streaming
Relevant content
- asked 2 months ago
- asked a year ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago