mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-13 01:41:59 +00:00
16 lines
481 B
Bash
16 lines
481 B
Bash
#!/usr/bin/env bash
|
|
set -xeo pipefail
|
|
|
|
VENV=lambda-venv
|
|
py_exec=$(which python3)
|
|
py_version=$(basename "$(readlink -f "$py_exec")")
|
|
rm -rf "$VENV" lambda-package.zip
|
|
virtualenv "$VENV"
|
|
source "$VENV/bin/activate"
|
|
pip install -r requirements.txt
|
|
PACKAGES="$VENV/lib/$py_version/site-packages"
|
|
cp app.py "$PACKAGES/"
|
|
( cd "$PACKAGES" && zip -r ../../../../lambda-package.zip . )
|
|
|
|
aws lambda update-function-code --function-name team-keys-lambda --zip-file fileb://lambda-package.zip
|