Bypass the 50 MB Lambda Deployment Package Size Limit by Deploying via S3

AWS Lambda doesn’t allow the deployment package of a Lambda function to be larger than 50 MB in size. But that’s only when you upload the package directly to the function. If instead, you upload the package to S3 & provide the S3 URL to the Lambda function, you can get away with deployment packages up to 250 MB in size (uncompressed)!

Take a look at the error when you try a 50+ MB upload:

Now, if you upload the same package to S3 first & provide its URL here, Lambda happily accepts it:

This trick isn’t limited to the Lambda console either. It can be used in automated deployment pipelines as well!