What is the primary benefit of using Lambda layers for shared code in AWS Lambda functions?
Think about how to avoid repeating the same code in many places.
Lambda layers let you package libraries and code separately, so multiple functions can use them without copying the code into each function.
You have created a Lambda layer containing shared Python libraries. How do you configure your Lambda function to use this layer?
Think about how AWS links layers to functions.
Lambda functions use layers by referencing the layer's ARN in their configuration, which tells AWS to include the layer's content at runtime.
You have a Lambda layer with multiple versions. Your Lambda function uses version 3 of this layer. You publish version 4 of the layer with updates. What happens to your Lambda function?
Consider how versioning controls what code a function uses.
Lambda functions use a specific version of a layer. They do not update automatically when new versions are published. You must update the function configuration to use the new version.
Which practice improves security when using Lambda layers with shared code?
Think about controlling access and protecting code integrity.
Restricting access to layer storage and publishing prevents unauthorized changes and protects your Lambda functions from malicious code.
You have a Lambda layer of 60 MB unzipped size. Your Lambda function deployment package is 50 MB unzipped. What is the maximum unzipped size of the combined deployment package and layers at runtime, and what happens if the limit is exceeded?
Check AWS Lambda limits for deployment package sizes.
AWS Lambda limits the total unzipped size of deployment package plus layers to 250 MB. If this is exceeded, deployment fails and you must reduce size.