jkehler / awslambda-psycopg2

1.12k stars 363 forks source link

libssl.so.1.1 : cannot open shared object file: No such file or director #66

Closed cptkirkh closed 2 years ago

cptkirkh commented 3 years ago

This maybe my mistake somewhere but when I run through your steps on the build process it all works except when I run the lambda function on a DB that requires SSL I get this error. Did I do something wrong?

{ "errorMessage": "Unable to import module 'postgres_lambda': libssl.so.1.1: cannot open shared object file: No such file or directory", "errorType": "Runtime.ImportModuleError", "stackTrace": [] }

ilirosmanaj commented 2 years ago

@cptkirkh , did you find a solution to this one? Getting the same message even after using the psycopg2 version with ssl support over here

lkinley commented 2 years ago

You have to compile on Amazon Linux, not Ubuntu. You have to match what the Lambda Python runtime is running on. 3.6, 3.7 are on Amazon Linux, 3.8, 3.9 are on Amazon Linux 2. https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html