aws-advanced-python-wrapper
Amazon Web Services (AWS) Advanced Python Wrapper
What it is and what it does
The AWS Advanced Python Wrapper is a middleware layer that sits between your Python application and database drivers, adding Aurora-specific failover and availability features. It maintains a cached view of your Aurora cluster topology and each instance's role, allowing it to detect and respond to primary instance failures faster than DNS resolution alone would permit. The wrapper also provides enhanced failure monitoring that can periodically check database host health and route connections away from unhealthy instances.
You use it by passing your existing driver's connect function to the wrapper's AwsWrapperConnection.connect() method, then interact with the returned connection object as you normally would. The wrapper handles failover coordination transparently—when a primary fails, it uses its topology cache to quickly identify and connect to the new primary replica, minimizing downtime. It works with both Aurora and plain RDS databases, though Aurora deployments benefit most from its features.
Use it for:
- Reduce failover latency in Aurora clusters by bypassing DNS resolution delays during primary instance failures.
- Add automatic connection rerouting to healthy cluster members without rewriting existing database code.
- Monitor database host health proactively and abort connections to unhealthy instances before queries fail.
- Maintain consistent database availability in multi-tier applications using Aurora with minimal code changes.
- Implement topology-aware connection handling for RDS clusters without custom failover logic.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Wraps Python database drivers to add Aurora failover support, topology caching, and enhanced failure monitoring without changing existing application code.
Yes, if you run Aurora or RDS clusters and want faster failover with minimal code changes. The wrapper is production-stable, actively maintained, has low install friction, and carries a permissive Apache-2.0 license. Install it when failover latency or connection reliability is a concern; skip it if you use managed connection pooling that already handles failover or if you run single-instance RDS databases.
Install
aws-advanced-python-wrapper on PyPI
pip
pip install aws-advanced-python-wrapperuv
uv add aws-advanced-python-wrapperpoetry
poetry add aws-advanced-python-wrapperInstalling aws-advanced-python-wrapper
Before you install
Low install friction with a pure-Python wheel. Active maintenance with recent commits and production-stable status. Requires Python 3.10 or later and nine runtime dependencies including boto3, opentelemetry-api, opentelemetry-sdk, and requests.
License in practice
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most projects.
Quickstart
from aws_advanced_python_wrapper import AwsWrapperConnection
with AwsWrapperConnection.connect(
driver_connect_func,
"host=database.cluster-xyz.us-east-1.rds.amazonaws.com dbname=db user=john password=pwd",
plugins="failover",
wrapper_dialect="aurora-pg",
autocommit=True
) as awsconn:
cursor = awsconn.cursor()
cursor.execute("SELECT 1")
print(cursor.fetchone())
Requires an underlying database driver and Python 3.10 or later (supports 3.10, 3.11, 3.12, 3.13).
Verify before relying
- Whether the wrapper's topology caching and failover detection work reliably with non-Aurora RDS instances.
- Performance overhead of the wrapper layer and topology refresh operations under high-throughput workloads.
- Compatibility with database drivers other than those mentioned in documentation.
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4.0.0,>=3.10.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 9 — aws-xray-sdk, boto3, boto3-stubs, opentelemetry-api, opentelemetry-sdk, requests, resourcebundle, toml, types_aws_xray_sdk |
| Maintenance | actively maintained — 72 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 85,121/month — #13,948 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aws_advanced_python_wrapper-3.0.0-py3-none-any.whl
Tags
More Database packages
psycopg2-binary is a PostgreSQL database…
copyleft · top 1,000 on PyPI
redisPython client library for connecting to and…
permissive · top 1,000 on PyPI
ydbYDB Python SDK is the official client library…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
sqlparsesqlparse tokenizes SQL text into a tree of…
permissive · top 1,000 on PyPI
dbt-adaptersProvides base adapter protocols and shared…
permissive · top 1,000 on PyPI
aurora-data-apiA DB-API 2.0 compatible client for AWS Aurora…
permissive · top 15,000 on PyPI
sqlalchemy-aurora-data-apiProvides a SQLAlchemy dialect for accessing…
permissive · top 15,000 on PyPI
cdk-aurora-globaldatabaseProvides AWS CDK constructs to deploy Amazon…
permissive · top 15,000 on PyPI
enirisEniris is a Python driver for the Eniris API…
permissive · top 15,000 on PyPI
sqlalchemy-rdsiamProvides SQLAlchemy dialects for connecting to…
unclear · top 15,000 on PyPI
pyathenajdbcPyAthenaJDBC wraps the Amazon Athena JDBC…
permissive · top 15,000 on PyPI
cassandra-sigv4Adds AWS Signature Version 4 authentication to…
permissive · top 15,000 on PyPI
aws-cdk.aws-applicationautoscalingProvides CDK constructs for configuring…
permissive · top 15,000 on PyPI
mysql-connectorMySQL driver written in Python that enables…
copyleft · top 5,000 on PyPI
clickhouse-driverA native TCP driver for ClickHouse that…
permissive · top 5,000 on PyPI