Lambda
Working with Lambda Layers
When creating a zip for a Lambda Layer (Python 3.6+) you need a full path to site-packages as shown below, using python3.8 as an example. Despite the common guidance, python -m pip install packagename -t folder/path does not work.
python
βββ lib
βββ python3.8
βββ site-packages
βββ aiohttp
βΒ Β βββ __init__.py
β βββ ...
βββ slack
βΒ Β βββ __init__.py
βΒ Β βββ ...
βββ slackclient-2.5.0.dist-info
βΒ Β βββ ...The folder will be unzipped at /opt
Last updated
Was this helpful?