Integrating Lambda Layers with the Serverless Framework
Description
If you are building different microservices, you should fall into the scenario where you have to install the same library and/or package on the microservices. This could become painful when you have dozens of services to handle and maintain. A good solution would be to have the microservices pointing to a single entity that acts as a container for the packages used in the microservices.
You can leverage AWS Lambda Layers with the Serverless Framework to achieve this result. A Lambda Layer is a container where you can put any kind of dependency that will be used from the Lambda functions. After creating it, you only need to link the Lambda to the Layer.
In this lab, you will use the Serverless Framework to integrate a public Lambda Layer and to deploy a function that leverages it.
Learning Objectives
Upon completion of this lab you will be able to:
- Integrate a Lambda Layer through the Serverless Framework
- Link Lambda functions to the Layer you create
Intended Audience
This lab is intended for:
- Software engineers mainly focused on serverless development
- Developers that need a solution to share packages across different services
Prerequisites
To get the most from this lab, you should have basic knowledge of the Serverless Framework. To get ready, you can use the following labs: