skip to Main Content

Suddenly, when I run my AWS lambda, I’m getting this error:

"Unable to import module 'lambda_name': /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /var/task/cryptography/hazmat/bindings/_rust.abi3.so)

I’m using Python runtime 3.9 with the following requirments.txt:

boto3
botocore
pycparser
pyopenssl
certifi
cffi

2

Answers


  1. Chosen as BEST ANSWER

    I was just able to fix this by removing the requirments.txt file and installing all my packages using:

    pip3 install --platform manylinux2014_x86_64 --target=pyopenssl --implementation cp --python-version 3.9 --only-binary=:all: --upgrade <package name>
    

  2. To solve the error, I installed the snowflake-connector-python==2.7.9 library within a temporary virtual environment. This environment was then used to create the Lambda layer zip file. Here’s the command I used:

    pip3 install 
    --platform manylinux2010_x86_64 
    --implementation cp 
    --only-binary=:all: --upgrade 
    --target venv/lib/python3.10/site-packages/ 
     snowflake-connector-python==2.7.9 boto3>=1.26.153 botocore>=1.29.153

    You may also wanted to take a look on Aws lambda returns /lib64/libc.so.6: version `GLIBC_2.28' not found

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search