View a markdown version of this page

Use Amazon Athena, powered by DuckDB - Amazon Athena

Use Amazon Athena, powered by DuckDB

With Amazon Athena, powered by DuckDB (Preview), you run SQL queries on DuckDB as a serverless, fully managed service, on data in Amazon S3 and the AWS Glue Data Catalog, without managing infrastructure. DuckDB is an open-source analytical database. It uses columnar storage and vectorized execution to efficiently process scans, joins, and aggregations on a range of data formats. Now available in preview, Athena can distribute a single DuckDB query over many workers, returning results in seconds on terabytes of data. For more information, see the DuckDB website.

You can run queries from the Athena console, the AWS CLI and SDKs, SageMaker Unified Studio, the Athena JDBC, ODBC, and ADBC drivers, or from a DuckDB client with the Athena extension for DuckDB.

Use cases

Amazon Athena, powered by DuckDB, supports multiple SQL analytics use cases, including:

  • Interactive analytics. Run interactive SQL queries on your data in Amazon S3, as you do with Athena engine version 3.

  • High-volume and agentic querying. Workloads that issue many queries, including AI agents, get fast, low-cost answers.

  • Develop locally and scale on Athena. Build and prototype queries in a local DuckDB client, then run them on Athena to work with larger datasets, using the Athena extension for DuckDB.

  • Work with open data and formats. Query Apache Iceberg table format v3 and Parquet tables through the Data Catalog. Your data stays in Amazon S3.

How it works

You write queries in DuckDB's SQL dialect and submit them through any Athena client, with nothing to set up or capacity to manage. Athena connects to your AWS Glue Data Catalog automatically, so you can query the data you already have in AWS without redefining tables or moving data.

Athena runs each query on DuckDB using serverless workers that Athena provisions and scales based on the query's complexity and the amount of data it processes. When a query processes more data than a single worker can handle quickly, Athena distributes query execution tasks across multiple workers. For more information, see Query execution.

When your query completes, Athena can return the results in Apache Arrow format, which is interoperable with popular third-party packages and frameworks.