Skip to Content
Learn AWS Serverless Computing
book

Learn AWS Serverless Computing

by Scott Patterson
December 2019
Intermediate to advanced
382 pages
9h 43m
English
Packt Publishing
Content preview from Learn AWS Serverless Computing

Understanding Lambda layers

Let's say we are developing multiple Python functions. Each function uses a number of Python modules that are packaged and deployed with the code each time you create or update a function. A lot of these modules are likely to be common across the Lambda functions, so we are duplicating the amount of storage space that's needed for each function. This has an impact on cost and function initialization performance since each time an execution is scheduled on a new host, it needs to pull the deployment package from S3. It also has an impact on the manageability of module versions if they are spread across multiple locations.

The following diagram shows two Lambda functions, both using the same libraries (A and B), ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Amazon EC2, SQS, Kinesis, and S3: A Hands-On Approach to AWS

Practical Amazon EC2, SQS, Kinesis, and S3: A Hands-On Approach to AWS

Sunil Gulabani

Publisher Resources

ISBN: 9781789958355