Introduction
When you have code or libraries that many AWS Lambda functions need, copying them into each function is slow and wasteful. Lambda layers let you put shared code in one place and use it in many functions easily.
When multiple Lambda functions use the same helper code or libraries.
When you want to update shared code without changing each Lambda function separately.
When you want to keep your Lambda function packages small and focused.
When you want to share common runtime dependencies across functions.
When you want to organize your code better by separating shared parts.