4 ms·
I believe AWS S3 allows setting the Content-Length header as well. So you might not need the lambda
by matusgallik008 2y ago
I believe AWS S3 allows setting the Content-Length header as well. So you might not need the lambda
- moomoo11 2y agoCan you explain what you mean? I'm confused about the "might not need the lambda". Thanks! In my case we allow up to 10mb file upload. For example just testing something right now from my iPhone I selected a 3.7mb image which was uploaded and resized to the "frame" it will go into in the UI and its now 288kb in S3. We have a few "frame" sizes which are consistent throughout our application. Now, my cloudfront is serving 288kb file instead of 3.7mb, which is good for me because I want to avoid the bandwidth costs and users honestly can't tell the difference, and then also we aren't a photo gallery app. So in my case I need the lambda to resize the image to our "frame" sizes. I wonder if I didn't explain right. I'm ESL so just want to make sure since I'm confused about the your last sentence.
- aprilnya 2y agoThey mean you might not need the lambda if all you want to do is enforce a max size; if you want to do resizing/other processing then you’d still need the lambda
- matusgallik008 2y agoYou're good mate. I meant exaclty what aprilnya said. I thought you are using the Lambda just to validate the 10mb limit - and just for that you don't need the lambda :) and could save yourself some cents & effort. But if you do resizing as well, then ofc you need the Lambda (or some other compute engine).