0

I'm trying to add the python zip files to was lambda which contains psycopg2 files in it.I'm getting an error. please try to help

  "errorMessage": "Unable to import module 'handler': libpq.so.5: cannot open shared object file: No such file or directory",
  "errorType": "Runtime.ImportModuleError"
user_3pij
  • 1,334
  • 11
  • 22
Akshay Jain
  • 13
  • 1
  • 4
  • Does this answer your question? [Using psycopg2 with Lambda to Update Redshift (Python)](https://stackoverflow.com/questions/36607952/using-psycopg2-with-lambda-to-update-redshift-python) – amsh Oct 06 '20 at 13:36

1 Answers1

6

The point is psycopg2 depends on native code (libpq.so) and your zip file does not contain this dependency.

See here for a solution

Another option is pip install psycopg2-binary. See here for details.

balderman
  • 22,927
  • 7
  • 34
  • 52