Загрузка страницы

How to use layers with Lambda functions?

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 https://youtu.be/JdJo-_Y1ZIM in which we use a layer to install ImageMagick to resize images within a lambda function.

⚡️ Github: https://github.com/alexkrkn
⚡️ Office Hours: https://undefinedapps.com/office-hours

⚡️ More Lambda Videos:
- How to install npm modules in AWS Lambda? https://youtu.be/RnFowJ130pc
- AWS Lambda versioning & aliases - How to deploy using versions + API Gateway https://youtu.be/OGMaE63YgEU
- How to deploy a lambda function using github actions? https://youtu.be/UQiRhKgQ5X0
- How to connect AWS Lambda to a MySQL database to update it? (using RDS proxy) https://youtu.be/jOLgUjcTFEI
- How to use environment variables with a Lambda function? (and how to encrypt them with KMS) https://youtu.be/J9QKS0NrH7I
- How to build a chat using Lambda + WebSocket + API Gateway? (nodejs) https://youtu.be/BcWD-M2PJ-8
- How to use ImageMagick with a Lambda function on AWS? https://youtu.be/JdJo-_Y1ZIM
- How to pass a url query string or a route parameter to AWS Lambda from API Gateway? https://youtu.be/V3i25clEvSE
- What is an AWS lambda function? https://youtu.be/okEvGTKpWl8
- How to restrict access to a static S3 site using HTTP Basic Auth? https://youtu.be/gc3w_bMtcQE
- AWS Lambda intro - versions, aliases, concurrency, triggers, logs and monitoring https://youtu.be/BFvF2oAnNpY

#lambda #layers #nodejs

Видео How to use layers with Lambda functions? канала BiteSize Academy
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
18 апреля 2020 г. 3:55:01
00:08:54
Яндекс.Метрика