Join us
Lambda previously had a limit of 6MB on request and response payloads for synchronous invocations, which affected API functions and the amount of data you could send and receive.
A common workaround was to put larger files on S3 and return a presigned URL, but this added latency and complexity.
However, with the new Response Streaming feature, Lambda can now return payloads larger than 6MB. To use this feature, you need to wrap your function code with the new streamifyResponse decorator and upgrade to the node14.x, node16.x, or node18.x runtime.
The requestStream contains the invocation event and the responseStream is a writable Stream object that streams bytes to the client. This feature can simplify returning larger objects, improve time-to-first-byte for multimedia content, and stream progress updates for long-running tasks.
However, there are some caveats, such as a default payload size limit of 20MB and compatibility issues with API Gateway and ALB.
Join other developers and claim your FAUN account now!
Only registered users can post comments. Please, login or signup.