Hi all, I have been learning AWS and find Lambda to be a great tool but find it really frustrating to install any Python libraries or dependencies. I have had so many issues with this and have watched just about every tutorial on YouTube for some reason layers never worked for me. The method I found that works is:
(1) Creating a new lambda function
(2) Create a folder on your desktop
(3) Make a python file you can just copy and paste the default Lambda function in here for now
(4) run command prompt / terminal and do pip install [package name] -t . pip3 if on Mac/linux
(5) turn your folder to a zip file and upload to lambda
(6) write your code using your package
(7) change Handler name to match file.function
(8) Deploy
A problem with this method is I found if you have many dependencies to deploy it will not let you use the inline lambda editor so I may come back to this in the future
0:00 Frustrated with AWS Lambdas
0:50 Create New Lambda
1:10 Create a new folder on Desktop
1:20 Create a python file in folder
1:45 Go into the folder with CMD
2:25 pip install your stuff
2:50 turn folder into a zip file
3:05 Upload the zip file to Lambda
3:50 move files into 1 higher directory
4:20 write python MUST have event, contect
5:20 Fixing the handler name
6:00 Deploying Lambda
Ещё видео!