Use the new AWS Lambda Layer task to publish shared dependenciesYou can now use the AWS Lambda Layer task to share additional code and content like libraries, a custom runtime, or other dependencies in the form of layers so that "you can use libraries in your function without needing to include them in your deployment package": Layers let you keep your deployment package small, which makes development easier. You can avoid errors that can occur when you install and package dependencies with your function code. [...] You can create layers, or use layers published by AWS and other AWS customers. Layers support resource-based policiesfor for granting layer usage permissions to specific AWS accounts, AWS Organizations, or all accounts. Layers are extracted to the /opt directory in the function execution environment. Each runtime looks for libraries in a different location under /opt , depending on the language. Structure your layer so that function code can access libraries without additional configuration.
Info |
---|
title | AWS Lambda limits for layers |
---|
| A function can use up to 5 layers at a time. The total unzipped size of the function and all layers can't exceed the unzipped deployment package size limit of 250 MB. For more information, see AWS Lambda limits. |
|