Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated readme file for instructions on how to package properly for a… #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ libpq library instead of the default dynamic link.
#### Python2.*
Just copy the psycopg2 directory into your AWS Lambda zip package.

#### Python 3.6
Just copy the psycopg2-3.6 directory into your AWS Lambda project and rename it to psycopg2 before creating your AWS Lambda zip package.
#### Python 3.9
When creating a lambda layer for deployment or packaging to be used as an import, follow these steps:
1. Create the following directory tree, if building for python3.6, otherwise replace ‘python3.9’ with the version choice:
2. `mkdir -p python/lib/python3.9/site-packages/psycopg2`
3. Choose the python version of interest and copy the files from the folders downloaded in step 1. to the directory tree in step 2. e.g. if building a layer for python 3.9: `cp psycopg2-3.9/* python/lib/python3.9/site-packages/psycopg2`
4. Create the zip file for the layer. e.g.: zip -r9 psycopg2-py39.zip python
5. Create a layer in the console or cli and upload the zip

### Instructions on compiling this package from scratch

Expand Down