You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider streaming the generated image from the lambda that generates it.
Where I got to
Streaming from Lambdas sucks because there's no TypeScript bindings
I managed to stream an image from S3 just fine, but getting a stream from Sharp was not obvious, so I'm backing away from this for now, at least until I get the non-streamed version working.
Why do it
It'd be faster
It'd work for my scenario
You can progressively stream response payloads through Lambda function URLs, including as an Amazon CloudFront origin, along with using the AWS SDK or using Lambda’s invoke API.
It'd return bigger images
Lambda has a size limit of 6MB on request and response payloads for synchronous invocations, and streaming gets around that
There’s a default streaming limit of 20MB. This is a soft limit and can be raised via the Service Quota console or you can raise a support ticket.
Why NOT do it
Every subsequent request for the image is streamed b/c 1) CloudFront caches the image and even if that fails, 2) CloudFront retrieves the derived image that's now stored in a S3 bucket
So I won't get a ton of benefit, but it might be nice for Lucie and I who have to hit that generation endpoint
Why not wait until we have the front end client implemented, and see how much the slowness is noticeable
The text was updated successfully, but these errors were encountered:
Consider streaming the generated image from the lambda that generates it.
Where I got to
Why do it
Why NOT do it
The text was updated successfully, but these errors were encountered: