Working with Lambda layers
A Lambda layer is a pre-published collection of code dependencies and libraries. If you find that you (or you, as a team) are using the same snippets of code in multiple functions, you can create a layer to get the benefits of Lambda layers. First, when there is a change to one of the dependencies, you no longer have to update each of the functions; instead, you only maintain a single layer that all the functions can take advantage of and only needs to be maintained one time:
Layers are a great way to speed up development between teams. Shared functionality such as logging, networking, or even database connectivity can be programmed and packaged into a layer once and then called from individual functions.
Adding a Lambda layer to our function
We already have a Lambda function from our previous exercise. Now, let's expand the functionality of our function...