Skip to content

About

Build of the popular Python lib psycopg2 for AWS Lambda

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

psycopg2 is a compiled Python's driver for SQL. That is why when you deploy it to AWS Lambda you probably get an error:

_psycopg2.so file had incorrect ELF headers

or

No module named _psycopg

Check Stack for more about this.


psycopg2/ and psycopg2-3.6/ are already compiled versiones of lib psycopg2 for AWS Linux. Just download it, put it into your vendored/ folder and import into your source code:

here = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(here, "./vendored"))

Feel free to compile it yourself with a Docker with this tutorial.

Enjoy!

About

Build of the popular Python lib psycopg2 for AWS Lambda

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages