AWS Lambda Layers Step by Step Tutorial | Python Libraries Management

preview_player
Показать описание
In this tutorial, I provided a step by step instruction on how to create lambda layers with pandas and requests using docker, and how to use them in a lambda function.

====== Chapters ======
0:00 - 3:03: Intro
3:04 - 11:33: Lambda Layer Deployment Package Creation
11:34 - 12:55: Lambda Layer Creation
12:56 - 17:37: Use Lambda Layers in a Lambda Function
Рекомендации по теме
Комментарии
Автор

very very very good tutorial! If all tutorials were made like this our lives would be significantly easier.

pa
Автор

Great video. Thanks. Somethings were missing but still helped a lot

renukasrivastava
Автор

Awesome info, gave you a thumbs-up, of course. Two suggestions: 1. Show a simple diagram that explains install docker, create a container, then a python environment in that container, which then does all the work and spits out the zip file with the library outside the container (a picture is worth a thousand words). 2. Suggest using virtual box with a Linux VM as an alternative - not everyone like containers :)

georgesmith
Автор

I had issues like image named aws_lambda_builder_image, you should first build it with "docker build . -t aws_lambda_builder_image"

Then in runner_sh, add quotes on $container_name and $docker_image. It should look like "$container_name"

capocianni
Автор

i'm stuck when trying to import confluent_kafka as a layer, it keeps saying can't find confluent_kafka.cimpl.
I've even tried what you showed as 1:09, still same problem (as just a work around).
curious, is there a permission that needs to be assigned to a lambda function to get access to a lambda layer ?

georgelza
Автор

Thank you for explaining the layers concept. How are these layers helpful in production ? Because I don't want to edit the code on console in production and moreover the code is shared in the repo. Can we pass handler to layer along with libs to execute my business logic instead of editing directly on console ?

indraalapati
Автор

Great video! Thank you. Can you supply the code you pasted?

MMeffert
Автор

build the image first docker build . -t aws_lambda_builder_image

chanpreetsingh
Автор

Too much for a lambda layer. Why would you even use docker?

mikecmw
Автор

Thanks for the video, it was very clear and precise, In the same way, I wanted to use the azure-identity package with my aws lambda function so for that purpose I created a directory and installed the azure-identity package using the pip command then converted it into a zip file and uploaded it to AWS lambda function along with function.py file. When I ran the script I got the import error stating that
Error Message: {
"errorMessage": "Unable to import module 'lambda_function': cannot import name 'x509' from (unknown location)",
"errorType": "Runtime.ImportModuleError",
"requestId": "3e17800f-0330-40f5-af54-69d860fbfdc1",
"stackTrace": []
} which is the dependent package for the azure-identity package. I would be grateful if you could please help me on how to fix this issue.

ManojKumar-zngf
join shbcf.ru