Last active
June 17, 2022 01:21
-
-
Save prakshalj0512/bc79b8ffae6f25154fe69a40f83e2283 to your computer and use it in GitHub Desktop.
Zipped Directory with packages to connect AWS Lambda with Snowflake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Install Python 3.7 | |
yum install -y python37 | |
yum install -y python3-pip | |
yum install -y zip | |
# Create virutal environment | |
python3.7 -m pip install --upgrade pip | |
python3.7 -m pip install virtualenv | |
python3.7 -m venv snowflake-venv | |
source snowflake-venv/bin/activate | |
# Install packages and zip them | |
mkdir -p lambda_layers/python/lib/python3.7/site-packages | |
pip3 install boto3 -t lambda_layers/python/lib/python3.7/site-packages/. | |
pip3 install snowflake-connector-python -t lambda_layers/python/lib/python3.7/site-packages/. | |
pip3 install snowflake-connector-python -t lambda_layers/python/lib/python3.7/site-packages/. | |
cd lambda_layers/ | |
zip -r snowflake_lambda_layer.zip * | |
# Exit the container | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment