The AWS Advanced Python Wrapper is a Python driver wrapper that adds enhanced functionality for Amazon Aurora databases, including automatic failover, connection pooling, and read/write splitting. It supports PostgreSQL and MySQL drivers. The current version is 2.1.0, with a release cadence of approximately every 3-4 months.
pip install aws-advanced-python-wrapperVerified import paths — ran on the pinned version, not inferred.
Connects to an Aurora database using the wrapper. Replace the connection string with your actual credentials.
Upgrade Python to 3.10+ or stay on version 1.x.
Refer to the documentation for new Failover v2 configuration keys. If you used custom failover settings, they may need updating.
Implement connection pooling yourself using the underlying driver's pool feature or a library like SQLAlchemy.
Ensure the RDS instance has IAM DB authentication enabled. Use the 'aws_secrets_manager' plugin for secrets-based auth as an alternative.
pip install aws-advanced-python-wrapper[pg]
Verify the connection string (e.g., 'postgresql://user:pass@host:5432/db'), check network connectivity, and ensure the database is accessible.
Use: from aws_advanced_python_wrapper import AwsWrapperConnection