Servisphere
Amazon Athena icon (AWS Architecture Icons)

Amazon Athena

SQL directly on S3

Run SQL queries (Trino/Presto) directly on data in S3 without setting up servers or loading data; uses the Glue Data Catalog for schemas.

  • Cost$ Low
  • Difficulty●●●●●
  • Costs money when idle?No
  • Serverless
  • In examsCLF · SAA · SOA

Scope: Regional

Open Athena on the map →
Think of it asLike looking things up directly in the document archive without copying them into another notebook.

When to use it

✓ Use it when

Ad-hoc analysis and querying logs (CloudTrail, ALB, VPC Flow Logs) on S3.

✗ Avoid it when

Continuous BI reporting, frequent complex queries → Redshift.

Common uses

  • Query CloudTrail/ALB logs on S3
  • Quick data lake analysis
  • Federated queries to other sources

What does it cost?

  • Pricing model: Charged by the amount of data scanned per query (or by provisioned capacity).
⚠️ Cost traps

SELECT * on large CSVs scans everything — use Parquet, compression, and partitioning to reduce data scanned.

Reference prices for us-east-1, updated October 14, 2026; they may have changed. Always check the AWS pricing page.

💡 Exam tip

When the question says ad-hoc SQL on logs in S3 without managing servers or loading data, choose Athena (use Parquet plus partitions to cut cost); for a data warehouse for frequent BI, Redshift.

Frequently asked questions

How does Athena pricing work and how do I reduce cost?

Athena charges for the amount of data each query scans, not by time or servers. To be cheaper and faster, store data in columnar formats (Parquet, ORC), compress it, and partition by commonly filtered fields such as date so queries scan only what is needed. Avoid SELECT * on large tables.

How is Athena different from Redshift?

Athena is serverless ad-hoc querying directly on S3 with no data loading, good for occasional analysis and logs. Redshift is a data warehouse with preloaded, optimized data, good for BI, dashboards, complex high-frequency queries and many concurrent users. They also work together: Redshift Spectrum reads S3 too.

What does Athena need to run and where do results go?

It needs data in S3 and table definitions, usually in the Glue Data Catalog. Each query's results are written to an S3 bucket you choose. You can use workgroups to separate users, limit data scanned and track costs, and federated query to reach sources beyond S3.

Related services

SAA-C03 study guide

Athena is covered in these study modules:

Open Athena on the map →