Cloud Parts

Amazon Athena

AWS’s serverless SQL engine for data in S3: no cluster to run, and on-demand queries cost $5 per TB scanned.

What it is
Query engines
Type
Managed service on AWS
Made by
Amazon Web Services
License
Proprietary
Facts checked
5 October 2026

What it is

You define tables in the AWS Glue Data Catalog, pointing at files in S3, and run SQL from the console, the API or a JDBC or ODBC driver. AWS supplies the compute for each query and takes it away when the query ends. On demand, you pay $5 for every TB a query scans, so converting data to compressed Parquet and partitioning it cuts the bill directly. For steady workloads, Capacity Reservations charge $0.30 per DPU-hour instead.

Athena engine version 3 continuously integrates open-source Trino and Presto, so its SQL and functions follow Trino’s. It reads and writes Iceberg tables, with INSERT, UPDATE, DELETE, MERGE, OPTIMIZE and time travel, and it reads Delta Lake and Hudi tables. Federated Query connectors reach sources outside S3, such as DynamoDB and other databases.

Why teams pick it

  • Nothing to run or size: query S3 moments after defining a table
  • Pay only for data scanned, with no idle cost
  • Iceberg reads and writes, with Glue as the catalog and Lake Formation to manage read access
  • Trino-compatible SQL

Watch out for

  • Cost tracks bytes scanned, so a SELECT * over raw CSV or JSON gets expensive fast
  • Iceberg tables must use the Glue catalog and format v2, and timestamps are limited to millisecond precision
  • Delta Lake is read-only, with no time travel
  • Trino connectors and fault-tolerant execution aren’t available; outside sources go through Federated Query

Alternatives

What all query engines have in common →
Apache Arrow AceroExperimentalOpen sourceThe streaming execution engine inside Arrow’s C++ library: you hand it an exact plan of nodes (scan, filter, project, aggregate, join, sort) and it streams Arrow record batches through them, with no SQL parser or optimizer of its own.Apache CalciteOpen sourceA Java framework with everything a database needs to understand a query (SQL parser, validator, relational algebra and a rule-based, cost-based optimizer) but no storage of its own, which Hive, Flink, Druid, Dremio, Beam and many other systems embed as their SQL front end and planner.Apache DataFusionOpen sourceA query engine library in Rust, built on Arrow, that other projects embed and extend to build their own databases and data tools.+1 Apache DataFusion CometApache HadoopOpen sourceThe project that made big-data clusters normal: a distributed file system (HDFS), a cluster scheduler (YARN) and the MapReduce engine.Apache HiveOpen sourceThe first SQL engine for Hadoop, and the source of the Hive Metastore, the table catalog that Trino, Spark, Impala and Flink still read.Apache ImpalaOpen sourceAn MPP SQL engine in C++ for interactive queries over Hive tables on HDFS, Kudu, Iceberg and object storage; built and mainly sold by Cloudera.Apache PigDormantOpen sourceA step-by-step scripting language, Pig Latin, that compiles to MapReduce, Tez or Spark jobs on Hadoop. Still released, but the project calls itself dormant.Apache SparkOpen sourceThe general-purpose distributed engine for large batch jobs, streaming and machine learning, in Python, SQL, Scala, Java or R.Apache ZeppelinOpen sourceA self-hosted web notebook where each paragraph runs through an interpreter: Spark, Flink, JDBC, Python and more. Maintained, but behind Jupyter and Databricks in reach.chDBOpen sourceThe ClickHouse engine packaged as a library: run ClickHouse SQL inside a Python, Go, Rust or Node.js program, with no server.Cloudflare Basin SQLRenamedCommercialCloudflare’s serverless, distributed SQL engine for Apache Iceberg tables in Basin Catalog on R2, called R2 SQL until it became generally available on 1 October 2026, billed by the data it scans.DuckDBOpen sourceAn in-process analytical SQL database: a library with no server that queries Parquet, CSV, Iceberg and S3 directly.GizmoSQLOpen sourceA database server that wraps DuckDB (or SQLite) and serves it to many clients over Arrow Flight SQL, with TLS and authentication.GlareDBDormantOpen sourceA small, embeddable SQL engine in Rust for querying Parquet and CSV files locally, over HTTP or in S3 and GCS, from a CLI, Python or the browser. It began as a DataFusion-based federated query service and was rewritten in 2025 on its own engine, and it has had no release since June 2025.HotdataCommercialA managed SQL engine for AI agents, built in Rust on Apache DataFusion and Arrow: each agent gets short-lived “instant databases” to load data into, then runs read-only SQL, vector, full-text and geospatial queries over an HTTP API or CLI.IbisOpen sourceA Python dataframe API that compiles to SQL, so the same code runs on DuckDB on a laptop and on BigQuery, Snowflake, PostgreSQL or more than 20 other engines.PolarsOpen sourceA DataFrame library with a Rust query engine underneath: you write Python (or Rust, SQL, Node.js, R) and it plans, optimises and runs the query on every core, streaming data bigger than memory.Presto (PrestoDB)Open sourceFacebook’s distributed SQL engine, now governed by the Linux Foundation, moving its workers from Java to C++ on Velox. Trino is its 2019 fork.RayforceOpen sourceA small embeddable engine in pure C that runs columnar analytics, graph traversals and recursive Datalog queries in one optimised plan.Spice.ai OSSOpen sourceA single-binary SQL engine in Rust, built on DataFusion and Arrow, that federates queries across databases, warehouses and lakes, keeps hot datasets in a local accelerated copy, and adds search and LLM APIs on top.TrinoOpen sourceA distributed SQL engine that queries data where it lives, from Iceberg tables on S3 to a live PostgreSQL database, in one query.VeloxOpen sourceMeta’s open-source C++ execution engine library: it takes an already-optimized query plan and runs it with vectorized operators, and it is the engine inside Presto’s C++ workers (Prestissimo) and Apache Gluten’s native Spark.

How it fits with other technologies

Create, change and compact an Iceberg table in Athena · sql

CREATE TABLE sales.orders (
  order_id bigint, customer_id bigint, amount decimal(10,2), ts timestamp)
PARTITIONED BY (day(ts))
LOCATION 's3://acme-lake/sales/orders/'
TBLPROPERTIES ('table_type' = 'ICEBERG');

DELETE FROM sales.orders WHERE customer_id = 4711;

OPTIMIZE sales.orders REWRITE DATA USING BIN_PACK;

SELECT count(*) FROM sales.orders
FOR TIMESTAMP AS OF (current_timestamp - interval '1' day);

See it in a real stack

No architecture uses Amazon Athena yet. Drop it into the playground and wire it up yourself.Open playground →

Benchmarks

How to read a benchmark →
Where it came from2016–2026

By 2016, many people were querying structured and semi-structured files at petabyte scale. Asking a question of data in S3 still meant work first: preprocessing, scanning, loading or indexing it, and building, managing and tuning a cluster to query it. Their questions were often ad hoc and exploratory, and they wanted answers in minutes.

AWS announced Amazon Athena at re:Invent on November 30, 2016. In his launch post, Jeff Barr described the goal as letting people run queries and act on the results “all in a matter of minutes”, without spending time on “preprocessing, scanning, loading, or indexing data”. Athena was based on Facebook’s open-source Presto engine. You defined a table with SQL DDL pointing at files in S3 (CSV, JSON, logs, Parquet or ORC) and queried them in place. There was no cluster to build, manage or tune, and you paid only for the data each query scanned. It launched in two regions.

Later releases added the Glue Data Catalog as a shared table registry, federated queries to other databases, Iceberg tables with row-level changes, and reserved capacity for steady workloads. In 2022 engine version 3 brought in the latest features from Trino, the project Presto’s creators renamed from PrestoSQL in 2020.

Why it’s built this way

Build on open-source Presto rather than a new engine
Presto had already run interactive SQL over petabytes at Facebook and read files in place, a natural fit for data sitting in S3. Engine version 3 now pulls in Trino and Presto changes continuously.
Bill per byte scanned, not per server
Ad-hoc queries are bursty, so paying for idle clusters made no sense. Charging by data scanned also rewards compressing, partitioning and converting data to columnar formats, which AWS recommended from launch.
Schema on read over files in S3
A table is just a definition pointing at files, so there is nothing to load or index: data written by any tool can be queried as soon as it lands.

Timeline

  1. 2016

    Announced at re:Invent on November 30, based on Presto

  2. 2017

    Integrates with the new AWS Glue Data Catalog

  3. 2020

    Federated Query reaches general availability in November, with connectors on Lambda

  4. 2022

    Iceberg ACID transactions GA in April; engine version 3, with the latest Trino features, in October

  5. 2023

    Provisioned Capacity offers fixed-price compute instead of per-TB billing

  6. 2026

    Capacity reservations can be bought by the minute, from 4 DPUs

Sources12 · facts checked 5 October 2026

Improve this page on GitHub