⚡️ 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
Смотрите видео How to use layers with Lambda functions? онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь BiteSize Academy 17 Апрель 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 40,348 раз и оно понравилось 884 людям.