skillfed

aws-psycopg2

A aws psycopg2 package from psycopg2.

aws-psycopg2 v1.3.8 3.4M downloads/30d#2,643 on PyPI80
Permissive license DORMANT released

What it is and what it does

aws-psycopg2 is a pre-compiled variant of the psycopg2 PostgreSQL driver for Python, designed specifically to work in AWS Lambda. Standard psycopg2 relies on system PostgreSQL libraries (libpq) that are not present in Lambda's execution environment. This package solves that by bundling a statically linked version of libpq, allowing you to connect to PostgreSQL databases directly from Lambda functions without additional layer setup or custom compilation.

The package has no runtime dependencies and installs as a simple wheel. It is intended as a drop-in replacement for psycopg2 in Lambda contexts, though its dormant maintenance status (last release 2022-07-02) means it may not track the latest psycopg2 features or security updates.

Use it for:

  • Connect to RDS PostgreSQL databases from AWS Lambda functions without packaging custom compiled libraries
  • Query PostgreSQL in Lambda-based data pipelines or ETL workflows
  • Build Lambda-triggered database operations for event-driven architectures

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides psycopg2 with statically linked PostgreSQL libraries for use in AWS Lambda environments where system PostgreSQL libraries are unavailable.

Yes, if you are deploying psycopg2 to AWS Lambda and do not want to manage custom compilation or Lambda layers. However, verify that the bundled PostgreSQL version and psycopg2 release remain compatible with your target Lambda runtime and database version, since the package has not been updated since 2022-07-02.

Install

aws-psycopg2 on PyPI

pip

pip install aws-psycopg2

uv

uv add aws-psycopg2

poetry

poetry add aws-psycopg2

Installing aws-psycopg2

Before you install

Low install friction with a wheel distribution. Maintenance is dormant—last release was 2022-07-02 and no commits since 2024-03-10—so updates and bug fixes should not be expected.

License in practice

Licensed under MIT (permissive), so you can use and modify the package freely in commercial or private projects without restriction.

Quickstart

pip install aws-psycopg2

import psycopg2
conn = psycopg2.connect("dbname=mydb user=postgres host=localhost")

Designed for AWS Lambda; requires Lambda execution environment or compatible system with statically linked PostgreSQL libraries.

Verify before relying

  • Whether the statically linked PostgreSQL version remains compatible with current AWS Lambda runtime environments
  • Whether this package works with modern psycopg2 versions or if it is tied to an older release
  • Support status for Python 3 versions beyond what the classifiers indicate

Package facts

License not declared (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 1,504 days since the last release
Last repo commit
First released
Downloads 3,382,210/month — #2,643 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aws_psycopg2-1.3.8-py3-none-any.whl

License :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

Tags

psycopg2 aws lambdapostgresql python lambdaaws lambda database connectionpsycopg2 static buildlambda postgres driver
aws-lambdapostgresql

More Database packages