===== AWS Lambda Python General ===== General tips that don't really fit anywhere else. {{tag>AWS Lambda Linux Python}} ==== Custom Environment ==== Create virtual environment.\\ ''python3 -m venv ENVIRONMENTNAME'' Enter and activate virtual environment.\\ ''cd ENVIRONMENTNAME/lib/python3/site-packages''\\ ''source ../../../bin/activate'' Install dependencies and create and test code.\\ ''python3 -m pip install DEPENDENCY''\\ ''vim CODE.py''\\ ''python3 CODE.py'' Cleanup and create zip.\\ ''python3 -m pip uninstall setuptools pip''\\ ''zip -r ../LAMBDA.zip *'' Now you can create your lambda function and upload the zip file. Also remember to update the handler to call your primary .py file and initial function.