Amazon Web Services (AWS) JDBC Driver for PostgreSQL
Get started now

The Amazon Web Services JDBC Driver has been redesigned as an advanced JDBC wrapper. This wrapper is complementary to and extends the functionality of an existing JDBC driver to help an application take advantage of the features of clustered databases such as Amazon Aurora.

The AWS JDBC Driver for PostgreSQL supports fast failover for Amazon Aurora with PostgreSQL compatibility and Enhanced Failover Monitoring.

HOW IT WORKS

Developers use software libraries, known as database connectivity drivers (or simply drivers), to connect applications to databases. A driver converts SQL queries in an application into a protocol language to communicate with the database and returns query results to the application. The AWS JDBC Driver for PostgreSQL is optimally configured to allow an application to connect to and take advantage of the features of clustered PostgreSQL database deployments.

Supporting Fast Failover for Amazon Aurora
In Amazon Aurora, failover is a mechanism by which the database automatically repairs the cluster status when a primary DB instance becomes unavailable. During failover, Aurora elects a database replica to become the new primary DB instance, so the cluster can provide maximum availability to a primary read-write DB instance.

Before a replica instance can be promoted to the primary DB instance, the DNS record must be updated in order to properly direct the connection. This process can take up to several minutes. The AWS JDBC Driver for PostgreSQL is designed to coordinate with this behavior in order to provide minimal downtime. It achieves this by maintaining a cache of the PostgreSQL cluster topology and each instance's role (replica or primary DB instance). This topology is provided via a direct query to the PostgreSQL database, providing a shortcut to bypass the delays caused by DNS resolution. With this knowledge, the AWS JDBC Driver for PostgreSQL can more closely monitor the database cluster status so that a connection to the new primary DB instance can be established as quickly as possible.

How the AWS JDBC Driver for PostgreSQL works

The figure above provides a simplified overview of how the AWS JDBC Driver for PostgreSQL handles an Amazon Aurora failover encounter. Learn more>>

BENEFITS
Seamless Deployment
The AWS JDBC Driver for PostgreSQL is based on and is drop-in compatible with the PostgreSQL JDBC Driver, so you can replace it in your application with few code changes.
Increased Application Availability
In the event of an Amazon Aurora primary DB failure, the AWS JDBC Driver for PostgreSQL supports fast failover to a database replica, resulting in minimal impact to application availability and user experience.
FAQ
What does drop-in compatible mean?
The AWS JDBC Driver for PostgreSQL is compatible with all PostgreSQL deployments, whether they be on-premises or in the cloud. It currently supports fast failover capabilities for Amazon Aurora with PostgreSQL compatibility only. The driver is based on and is drop-in compatible with the PostgreSQL JDBC Driver. Changes to the connection string is all that is needed. Support for additional features of clustered databases, including features of Amazon RDS for PostgreSQL and on-premises PostgreSQL deployments, is planned.
How do I use the AWS JDBC Driver for PostgreSQL?
The AWS JDBC Driver for PostgreSQL is an advanced wrapper, and is drop-in compatible for the PostgreSQL JDBC Driver. To replace your existing driver with the AWS JDBC Driver for PostgreSQL, follow the same steps used to update the current driver. Then, update the client connection string to use the AWS protocol when connecting. For details about Getting Started, visit here.
How do I see the project roadmap?
Enhanced Failure Monitoring (EFM) is a feature available from the Host Monitoring Connection Plugin that periodically checks the connected database node's health and availability. If a database node is determined to be unhealthy, the connection is aborted. For more information about the Host Monitoring Connection Plugin, visit here.
How can I get help or open an issue?
Work on the advanced AWS JDBC Driver for PostgreSQL is being managed in a Github project here. Visit the project website to file an issue or ask questions.
Where do I contribute to the project?
You can learn more about contributing to the driver on GitHub here.
Can I create my own driver from this project?
Yes! The driver is open source under the Apache-2 license clause. This means you are free to modify the driver to fit your particular needs.