Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to stream a response from a Python AWS Lambda

It is possible to have a Python Lambda in AWS that can stream the HTTP response back to the client?

The use case is to stream some data out of Elasticsearch, transform it to CSV, and stream it straight back to the client (via the API Gateway).

From what I can make out, this is possible in Java (https://stackoverflow.com/a/39382131/17641) and probably also possible in Node, but I can't see how to do this in Python.

like image 554
PEELY Avatar asked Jul 01 '26 08:07

PEELY


1 Answers

AWS has recently (April 2023) introduced Lambda response streaming: link

Note at the time of launch only node runtimes support this feature.

There are other caveats too, so reading the above article thoroughly is recommended.

like image 75
krish___na Avatar answered Jul 02 '26 23:07

krish___na