Install Python Dependency and Libraries on AWS Lambda

preview_player
Показать описание
This video shows you how to install Python Dependencies and Libraries on AWS Lambda using a Zip folder.

The Libraries used in the deployment package are Pandas, Numpy, and Requests but you can substitute them with any that you want such as SciPy.

⏱️TIMESTAMPS⏱️
00:00 - Install Python Dependency and Library on AWS Lambda
01:28 - Create Lambda Function Locally
01:48 - Lambda Code Explanation
02:47 - Create AWS Lambda Deployment Package
03:01 - Installing Libraries and Dependencies for AWS Lambda
04:44 - Create a Zip Folder with the Libraries
05:40 - Create Lambda Function in AWS Console
06:28 - Upload Zip Folder to Lambda Function
07:00 - Create a Test Event and Test Lambda Function

✔️ Source Code:
The Lambda function used can be found here:

The terminal commands used are as follows:
Pandas
pip install --platform manylinux2014_x86_64 --target=package --implementation cp --python-version 3.9 --only-binary=:all: --upgrade pandas

Numpy
pip install --platform manylinux2014_x86_64 --target=package --implementation cp --python-version 3.9 --only-binary=:all: --upgrade numpy

Requests
pip install --platform manylinux2014_x86_64 --target=package --implementation cp --python-version 3.9 --only-binary=:all: --upgrade requests

⚡ My Gear

🎵 Music

✅ Let's connect:

💬 Twitter - @nktstudios

DISCLOSURE: Some of the links on this page are affiliate links, meaning, at no additional cost to you, I may earn a commission if you click through and make a purchase and/or subscribe. Affiliate commissions help us to continue making videos for you.

❤️ Thanks for watching.
Рекомендации по теме
Комментарии
Автор

I watch similar videos on the topic but your pip install command was the only one that actually worked thanks for the video!

vitorcavalcante
Автор

thank you so much for this video. Like some comments below, your video was the only one that worked for me. You kept it nice and simple. Thanks!!

AlfonsoLopez-lh
Автор

I have no words to express how i feel now. Thank you so much! I had the same problem, but i was working with Python 3.12 and the module was requests. I just changed the version in the command and run it, after that i just uploaded the zip and it's working as expected.

specx
Автор

I can't thank you enough man, I spent hours on this sh!t and this is the only solution that worked thank you so much!

BrajBliss
Автор

It seems that the console won't allow us to edit the code if we use this approach. Is there an alternative that would allow us to edit the code post the zip upload?

noelperezperez
Автор

Helloo I need help with the dependency I am trying to install webrtcvad how to do?

Vysh-jiszxft
Автор

Thank you very much for your assistance

sachinbaghel
Автор

can this be used to create a new layer?

danna_taylor
Автор

Excellent. Also, what about packaging the wand libraries similar to this ? I had a hard time on setting this up in the lambda, but didn't get it succeeded.

AjishPrabhakar
join shbcf.ru