0

I am trying to build, snowflake-connector-python, as a lambda layer to execute SQL on Snowflake. I am using the dependencies listed here to build the zip file with dependencies on Amazon linux EC2 instance - https://github.com/snowflakedb/snowflake-connector-python/blob/main/tested_requirements/requirements_39.reqs

Python runtime version - 3.9 snowflake-connector-python - 3.0.4

I followed the recommended process to build the zip file with connector and dependencies and uploaded them as a lambda layer. However, when I run a simple app to test the import -

import snowflake.connector

this is the error message -

Response { "errorMessage": "Unable to import module 'lambda_function': /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /opt/python/cryptography/hazmat/bindings/_rust.abi3.so)", "errorType": "Runtime.ImportModuleError", "requestId": "5245b8b3-bd72-4e8c-9ead-518418617d93", "stackTrace": [] }

cryptography version I imported is the exact version listed in the git repo. Has anyone faced similar issues importing snowflake connector.

Thank you.

1
  • I figured out the issue..was creating the zip folder using AL2012 linux version. Once I change to AL2 which is the default lambda linux version, it worked fine. Thanks for checking-in! Commented Jul 11, 2023 at 18:34

1 Answer 1

1

Issue was with creating the zip folder using AL2012 linux version. Once I change to AL2 which is the default lambda linux version, it worked fine. Thanks for checking-in!

https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.