Layers in AWS Lambda are used to pull in additional code such as external libraries, custom runtimes or other dependencies needed by your application. This way you can keep your application code small and you can reuse components between different lambda functions.
This video shows you how to configure an AWS SAM project to use Lambda Layers and how to package and deploy them automatically.
You can find the code from the video in the following GIT repository: https://github.com/majestic-cloud/lambda-layers