I am running an AWS Lambda function
that uses one layer with snowflake-connector-python
.
To create the layer I use:
docker run -v <your dev directory>:/lambda -it --rm ubuntu
apt-get update
apt-get install python3-pip
apt-get install zip
cd lambda
mkdir -p temp/python
cd temp/python
pip3 install snowflake-connector-python -t .
cd ..
zip -r9 ../snowflake-connector-python.zip .
The lambda returns:
"errorMessage": "Unable to import module 's3PutLambda': /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /opt/python/cryptography/hazmat/bindings/_rust.abi3.so)",
"errorType": "Runtime.ImportModuleError",
"requestId": "baa60d07-c9bb-4b32-a38f-3158eb50da09",
"stackTrace": []
I tried also some other solutions, such as adding to the zip:
pip3 install cryptography==3.4.8
pip3 install bcrypt==3.2.2
The same error was raised.