Skip to content

Instantly share code, notes, and snippets.

@ottokruse
Created May 1, 2020 14:57
Show Gist options
  • Save ottokruse/9db97147c06e6dc74dc887ba7998c53f to your computer and use it in GitHub Desktop.
Save ottokruse/9db97147c06e6dc74dc887ba7998c53f to your computer and use it in GitHub Desktop.
Install Lambda Layer dependencies (Python 3.8)
#!/bin/sh
LAYER_DIR=lib/lambda-layers
for DIR in $(ls $LAYER_DIR); do
echo "Installing layer: $DIR"
cd $LAYER_DIR/$DIR
git check-ignore * > /dev/null && rm -r $(git check-ignore *)
docker run --rm --init -v "$(pwd):/${DIR}" lambci/lambda:build-python3.8 sh '-c' "pip install -r /${DIR}/requirements.txt --target /${DIR}/python"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment