JDBC 4.x - Amazon Athena
Services or capabilities described in AWS documentation might vary by Region. To see the differences applicable to the AWS European Sovereign Cloud Region, see the AWS European Sovereign Cloud User Guide.

JDBC 4.x

Use the JDBC 4.x driver to connect custom Java applications and SQL clients to Amazon Athena engine version 3 or DuckDB workgroups.

For other JDBC driver versions, see Athena JDBC 3.x driver and Athena JDBC 2.x driver.

Installation artifacts

The driver provides athena-jdbc-4.0.0-with-dependencies.jar and a lean athena-jdbc-4.0.0.jar with separate dependency JARs in runtime-dependencies. Add the selected distribution and its required dependencies to the SQL client or application classpath.

The following table describes driver downloads.

DistributionDownload
JAR with dependencies
Lean JAR and separate dependency JARs

The driver class is com.amazon.athena.jdbc.AthenaDriver; use the jdbc:athena:// URL prefix.

For connection examples and platform commands, see Get started with the JDBC 4.x driver. For changes in this version, see Release notes.

Engine selection and permissions

Grant the connection credentials athena:GetWorkGroup. The driver reads workgroup configuration during validation and selects the matching dialect and result storage; an unrecognized engine fails validation unless a supported override is supplied.

Open a new connection after changing a workgroup engine. For Arrow JVM configuration and a connection example, see Get started with the JDBC 4.x driver.