I walk through how to make and use Lambda Layers in AWS. I show how to import external dependencies in a python runtime environment by adding a custom Lambda Layer. Here are the commands used in the video:
Open terminal:
mkdir my-lambda-layer && cd my-lambda-layer
mkdir -p aws-layer/python/lib/python3.11/site-packages
nano requirements.txt
(put your dependencies here, like: requests)
pip3.11 install -r requirements.txt --target aws-layer/python/lib/python3.11/site-packages
cd aws-layer
zip -r9 lambda-layer.zip .
Credit: towardsdatasci...
Негізгі бет How to create and use Lambda Layers in AWS in under 7 minutes
Пікірлер: 9