How to use layers with Lambda functions?

Published: 17 April 2020
on channel: BiteSize Academy
40,348
884

⚡️ Blog post: https://www.undefinedapps.com/post/la...

In this video we look at how to use layers with AWS Lambda functions. (with nodejs)

We look at a demo app which uses two npm modules (axios and image-size) which were installed using npm and are part of the bundle. We then extract these modules into a layer. We attach this layer to our function and import and use the modules we extracted.

It has 2 advantages:
it reduces the size of the bundle
it makes it possible to re-use the extracted code across several functions.

We also look at how to separate local files and extract them into a layer and then import them from the function.

If you would like to see an example of using layers, check out this video    • How to use ImageMagick with a Lambda ...   in which we use a layer to install ImageMagick to resize images within a lambda function.

⭐️ Subscribe for more content: https://newsletter.undefinedapps.com/

#lambda #layers #nodejs


Watch video How to use layers with Lambda functions? online without registration, duration hours minute second in high quality. This video was added by user BiteSize Academy 17 April 2020, don't forget to share it with your friends and acquaintances, it has been viewed on our site 40,348 once and liked it 884 people.