Lambda Layers For Python Libraries + CloudShell
Code snippets for this tutorial:
01: mkdir lambda-requests-layer 02: cd lambda-requests-layer 03: python -m venv lambda-requests-env 04: source lambda-requests-env/bin/activate 05: pip install requests 06: python --version 07: mkdir -p layer/python/lib/python3.9/site-packages/ 08: cp -r lambda-requests-env/lib/python3.9/site-packages/* layer/python/lib/python3.9/site-packages/ 09: cd layer 10: zip -r lambda-requests-layer.zip . 11: aws lambda publish-layer-version --layer-name requests-layer --zip-file fileb://lambda-requests-layer.zip --compatible-runtimes python3.9