Trim Dependencies - Serverless Architectures with AWS Lambda

Trim Dependencies

Lambda function code packages are permitted to be at most 50 MB when compressed and 250 MB when extracted in the runtime environment. If you are including large dependency artifacts with your function code, you may need to trim the dependencies included to just the runtime essentials. This also allows your Lambda function code to be downloaded and installed in the runtime environment more quickly for cold starts.