Streaming Response from Lambda in Python

1

Hey, I just saw that we can stream responses from lambda using function urls. Is there a way to stream responses if I am using python. As the documentation doesn't show anything regarding python, it shows an example of js. Please help me with this. Thankyou.

質問済み 2ヶ月前597ビュー
1回答
1

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

profile picture
エキスパート
回答済み 2ヶ月前
profile pictureAWS
エキスパート
Uri
レビュー済み 2ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ