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!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.