Skip to content

AWS Advanced Python Wrapper - v3.2.0

Latest

Choose a tag to compare

@github-actions github-actions released this 03 Dec 21:22
· 1 commit to main since this release

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[3.2.0] - 2026-12-03

Warning

Asynchronous applications that connect to multiple database clusters must now set a unique cluster_id for each cluster. Without it, connections to different clusters share one topology. See the Cluster ID documentation.

🪄 Added

  • The connection_lifetime plugin, which closes or reconnects a physical connection once it reaches connection_lifetime_ms, in both the synchronous and asynchronous wrapper. See Connection Lifetime Plugin. (PR #1365)
  • The preserve_driver_exception_type parameter, which makes the failover and failover_v2 plugins re-raise driver errors that do not trigger failover as they are, so ORMs can classify them. (Issue #1275, PR #1282)
  • The KMS Encryption Plugin (kms_encryption), which encrypts values bound for configured columns with AWS KMS-protected data keys and decrypts them on read, in the synchronous wrapper. Install it with pip install "aws-advanced-python-wrapper[encryption]". See KMS Encryption Plugin. (PR #1331)
  • Synchronous plugins can replace the arguments that Cursor.execute and Cursor.executemany pass on, through the plugin service's current_call_context. See The Call Context. (PR #1330)
  • Support for Aurora cluster group writer and reader endpoints. (PR #1366)
  • A configuration reference for AI coding assistants, PYTHON-WRAPPER-CONFIGURATION-ASSISTANT.md. (PR #1293)

🐛 Fixed

  • Queries waiting for a busy wrapper thread pool raised QueryTimeoutError even when they ran within socket_timeout, because the timeout counted the wait. The timeout now starts when the query starts running. (Issue #1278, PR #1294)
  • With psycopg, a fetch chained onto cursor.execute() skipped every plugin, including failover and host monitoring. execute() now returns the wrapper's cursor, so isinstance(cursor.execute(query), psycopg.Cursor) is now False. (PR #1330)
  • for row in cursor on a synchronous cursor skipped every plugin, and next(cursor) raised TypeError. Both now go through the plugins. (PR #1330)
  • The synchronous wrapper kept selecting a host that refused connections, and now marks such a host unavailable. (PR #1297)
  • DEBUG logs, error messages and repr() output included auth tokens, Secrets Manager secret values, passwords and statement text, which are now omitted or masked. (PR #1340)
  • Blue/Green deployments: a call suspended during a switchover hung at full CPU after the switchover moved on, and new connections were not routed to the green hosts. (PR #1360, PR #1401)
  • The Limitless Router Monitor failed to start when a limitless-router-monitor- prefixed property was set. (PR #1393)
  • After a failover, a connection to the writer cluster endpoint was sent to the old writer, which is now a reader. (PR #1371)
  • With mysql-connector, closing a cursor opened before a failover raised ReferenceError instead of letting FailoverSuccessError through. (PR #1371)
  • The Aurora Initial Connection Strategy plugin retried a failing host with no delay and left a connection open on each attempt. It also kept choosing a reader that refused connections, and failed without connecting when open_connection_retry_timeout_ms was 0. (PR #1291)
  • Asynchronous wrapper fixes:
    • async for over a cursor stopped at the first None row and lost the rows after it. (PR #1392)
    • The Aurora connection tracker closed its own connection on the first statement, and host monitoring v2 recreated its monitors on every statement. (Issue #1276, Issue #1287, PR #1348)
    • Plugins such as initial_connection, host_monitoring and stale_dns received a host list without the cluster topology. (PR #1292)
    • Each connection ran its own topology monitor and monitoring connection, and connections to the same cluster now share one. (PR #1295)
    • An error while creating a cursor reached the application instead of starting failover. (PR #1371)

☁️ Changed

  • The asynchronous wrapper now identifies a cluster by the cluster_id parameter (default "1"), as the synchronous wrapper does. (PR #1295)
  • The Aurora Initial Connection Strategy plugin connects once and raises the driver's error when it has nothing to substitute or verify. It also rejects invalid values for inactive_cluster_writer_endpoint_substitution_role, verify_inactive_cluster_writer_endpoint_connection_type and endpoint_substitution_role on RDS Proxy and Limitless endpoints. (PR #1291)