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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With