How to Create a Python Dependency / Pandas Layer for AWS Lambda | AWS Cloud9 | AWS Lambda | Python

Опубликовано: 18 Октябрь 2024
на канале: CivilTEKK
2,282
41

Note to Viewers: Subscribing is free! You won't be charged anything! If you like the video please like and subscribe! Do leave some comments below if you have any ideas that you want to be realized!

Links used in the video:
Installing Python3.9: https://linuxize.com/post/how-to-inst...

You can message me at:
LinkedIn:   / khiong-kiat  
Personal blog: www.civiltekk.com

text code in notepad
-----------------------
mkdir folder
cd folder
python3.9 -m venv myvenv
source myvenv/bin/activate
pip install pandas
deactivate
mkdir python
cd python
cp -r ../myvenv/lib/python3.9/site-packages/* .
cd ..
sudo apt-get install zip (if you dont have zip)
zip -r panda_layer.zip python

aws lambda publish-layer-version --layer-name pandas-tutorial --zip-file fileb://panda_layer.zip --compatible-runtimes python3.8 python3.9

_____________
if u cant find "activate" inside source myvenv/bin/activate, then proceed to install "apt-get install python3.9-dev python3.9-venv"