Making a Lambda Layer
Create a new virtual environment
python3 -m venv venv
source venv/bin/activate
Install the package in the virtual environment
pip install slack_sdk
Make a directory called python
and move the lib
directory in there
mkdir python
mv venv/lib python
Zip up python directory
Go to Finder → Compress
OR
zip -r python.zip python
Create the lambda layer
Select compatible runtimes
Make SURE the compatible runtimes match the folder name in lib
‼️
Create a new layer in the console
Add a lambda layer
Select lambda layer