DEV Community

Hardy
Hardy

Posted on

Throw away layers in test AWS Lambda

This is a python demo:

install lib in /tmp, then add /tmp to path

import os
import sys
os.system("pip install -r requirements.txt -t /tmp  -i https://pypi.tuna.tsinghua.edu.cn/simple")

sys.path.append('/tmp')
Enter fullscreen mode Exit fullscreen mode

Top comments (0)