3 Ways to Overcome AWS Lambda Deployment Size Limit — Part 1

Bk Lim
Geek Culture
Published in
6 min readMay 16, 2021

--

Photo by pine watt on Unsplash

For engineers that frequently deploy serverless function to AWS Lambda, there will be a point in time where you get hit by the following errors:

And that’s because AWS Lambda imposes certain quotas and limits on the size of the deployment package, i.e. 50MB for zipped + direct upload, and 250MB (actual figure around 262MB) for uncompressed package.

This article shares some workarounds I personally use to overcome the limit. For demonstration purposes, I have a barebone Python lambda function setup that has a mock data file of 250MB. The zipped size of the entire repo is around 117MB and unzipped size is around 300MB.

--

--

Bk Lim
Geek Culture

Software Engineer @ Meta. GCP PCA. Likes to write about tech, architecture, automation, JS and Python. :)