Reputation: 315
I am trying to add snowflake-connector-python
version 2.7.9 as a layer in aws lambda.
I am getting this error
Unable to import module lambda_function: /lib64/libc.so.6: version GLIBC_2.28 not found (required by /opt/python/lib/python3.9/site-packages/cryptography/hazmat/bindings/_rust.abi3.so)
Steps I have tried
docker run -v /Users/local/Documents/docker_test:/working -it --rm ubuntu
once inside i tried
apt-get update
https://exchangetuts.com/how-to-install-python39-on-linux-ubuntu-terminal-1639972230035814
apt install python3-virtualenv
Then i zip the /python/lib/python3.9/site-packages
contents and create a layer in aws. And i function is simple
import json
import snowflake.connector
def lambda_handler(event, context):
# TODO implement
return {
'statusCode': 200,
'body': json.dumps('Hello from Lambda!')
}
Some of things i had to do to get to this error
No module named '_cffi_backend'
python
and python3
to point to python3.9
How to i get this error /lib64/libc.so.6: version GLIBC_2.28
fixed ?
Upvotes: 0
Views: 1350
Reputation: 1
I had a similar issue and had to specify an older cryptography version in the lambda layer (pip install cryptography==3.4.8). For me this solved the issue, hope this helps you too!
Upvotes: 0