Search code examples
amazon-web-servicesamazon-s3aws-lambdapayload

AWS size limit on lambda output to be written to s3


I have to create a lambda that processes some payload and creates an output that is greater than the limit 6 MB for the response payload.

A way to solve this problem mentioned over various SO answers is to directly put the file on an s3.

But what these answers fail to mention is the upper limit of the output that can be saved into the s3 by the lambda. Is it because there isn't any limit?

I just want to confirm this before moving forward.


Solution

  • There are always limits. So yes, there is also a limit of object size in a S3 bucket. But before you hit that limit, you are going to hit other limits.

    Here is the limit of uploading files using the API:

    Using the multipart upload API, you can upload a single large object, up to 5 TB in size.

    (Source)

    But you are probably not going to be able to achieve this with a Lambda, since Lambdas have a maximum running time of 900 seconds. So even if you could upload a file at 1GB/s, you only would be able to upload 900GB before the Lambda stops.