Building a python lambda layer for dependencies Add pip dependencies to requirements.txt Run the following: DOCKER_BUILDKIT=1 docker build --file Dockerfile --output out . Copy the layer.zip file from ./out/layer.zip to your serverless repo.