--- id: aws-psycopg2 version: "1.3.8" license: unclear license_treatment: permissive maintenance: dormant --- # aws-psycopg2 — A aws psycopg2 package from psycopg2. License: permissive · Maintenance: dormant · Downloads: 3.4M/mo ## 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 above — 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 pip install aws-psycopg2 uv add aws-psycopg2 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: unspecified - Install friction: low - Maintenance: dormant - Downloads: 3.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags psycopg2 aws lambda, postgresql python lambda, aws lambda database connection, psycopg2 static build, lambda postgres driver, aws-lambda, postgresql [View on SkillFed](https://skillfed.io/packages/aws-psycopg2) · [View on PyPI](https://pypi.org/project/aws-psycopg2/)