Layers
1. Go to the Download Files
section of the package you want.
2. Download the archive for your intended Python version.
Most packages will only have one archive that is compatible with any platform. In cases
of multiple options, look for x86-64
AND manylinux
, which is what we currently use
at the time of writing.
3. Extract its contents to a folder specifically named python
.
4. Do the same for its dependencies. The ending folder structure should look like this:
To find its dependencies, try to install the package in an empty virtual environment,
then do pip list
.
5. Zip the folder and upload it to AWS Lambda.
- Make sure that the
python
folder is at the base of the archive. - The name of the archive does not matter.