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

Amazon Web Services (AWS) JDBC Driver for PostgreSQL is a driver that enables applications to take full advantage of the features of clustered PostgreSQL databases. It is based on and can be used as a drop-in compatible for the PostgreSQL JDBC Driver and is compatible with all PostgreSQL deployments.

The AWS JDBC Driver for PostgreSQL currently enables fast failover for Amazon Aurora with PostgreSQL compatibility. Support for additional features of clustered databases, including features of Amazon RDS for PostgreSQL and on-premises PostgreSQL deployments, is planned.

IMPORTANT Because this project is in preview, you may see breaking changes throughout. We encourage you to experiment with PostgreSQL driver but DO NOT adopt it for production use. Use of PostgreSQL driver in preview is subject to the terms and conditions contained in the AWS Service Terms, particularly the Beta Service Participation Service Terms, and apply to any drivers not marked as 'Generally Available'.

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 enable applications to connect to and take advantage of the features of clustered PostgreSQL database deployments.

Enabling 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. It achieves this by electing a database replica to become the new primary DB instance, so that the cluster can provide maximum availability to a primary read-write DB instance.

Before a replica instance can be elevated 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 users can replace it in their applications with little code changes.
Increased Application Availability
In the event of an Amazon Aurora primary DB failure, the AWS JDBC Driver for PostgreSQL enables 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 enables 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 drop-in compatible for the PostgreSQL JDBC Driver. You can replace your existing driver with the AWS JDBC Driver for PostgreSQL following the same steps used to update an existing driver. Changes to the connection string is all that is needed. Installation instructions can be found here.
How do I see the project roadmap?
You can view the roadmap for the AWS JDBC Driver for PostgreSQL here.
How can I get help or open issues?
You can get help or open issues related to the AWS JDBC Driver for PostgreSQL on Github here.
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?
Yes! The driver is open source under the BSD-2 license clause. This means you are free to modify the driver to fit your particular needs.