Closed eugypalu closed 2 years ago
I had the same error when using Lambda runtime Python 3.8 (Latest) with the 3.7 psycopg2 package. Changing Lambda runtime down to 3.7 fixed the issue.
I am getting this error, even when downgrading my lambda Python version.
I was using Python 3.8 in Lambda.
I renamed the psycopg2-3.8
folder from this repository to psycopg2
and used it in my zip file (to upload to Lambda), and this fixed my issue.
I've lambda function with python 3.6 When I deploy it, I get this error: "errorMessage": "Unable to import module 'lambda_function': /var/task/psycopg2/_psycopg.so: undefined symbol: PyUnicodeUCS4_DecodeUTF8"
python 3.6 psycopg2 for python 3.6 (renamed as psycopg2)