Skip to content
BENIBIX Learn

Amazon Athena

Data📊 Analytics & BIQuery Engines

Also known as Athena, AWS Athena

An AWS service that runs SQL on files in S3. You pay for the data each query reads.

Think of it like

It is like a library where you pay for each page you read. You never pay for the shelves.

Example

Lucy keeps a year of web logs in S3. One Athena query reads 200 GB and costs about $1, at $5 per terabyte read.

Why it matters

Teams can query files in a lake without running a warehouse. For a few questions a week, it costs very little.

Definition

Amazon Athena is an AWS service that runs SQL on files stored in Amazon S3. There are no servers to set up or keep running. You point it at a folder of files, describe the table, and ask your question. You pay for the data each query reads, not for time. Its SQL engine comes from the open-source Trino and Presto projects.

Example code

sql
SELECT status, COUNT(*) AS hits
FROM web_logs
WHERE day = '2026-03-02'
GROUP BY status;
Plain SQL over files. A filter on the day reads less data, so the query costs less.
Athena is the engine in the middle. AWS runs it for you, and the data is files in S3.

Common mistake

Querying raw CSV files with no partitions. Each query then reads everything, and the bill grows fast.

Key takeaways

  1. 1
    No servers. AWS runs the engine for you.
  2. 2
    Pay per scan. The bill follows the data read.
  3. 3
    Files stay put. The data stays in S3 as files.