Skip to main content
Intermediatehow it works Verified ~5 min

How is Athena billed, and how do you cut its cost?

Source: Amazon S3: data consistency model

Quick answer

SQL queries are billed by bytes scanned, rounded up to the nearest megabyte with a 10 MB minimum per query.

Athena has three billing modes, and the one you choose decides how you cut cost.

1. On-demand SQL queries (the default). You pay for the data a query scans: USD 5 per TB in the US East (N. Virginia) pricing examples (the price differs by Region, so check the Athena pricing page). The scan is rounded up to the nearest megabyte, with a 10 MB minimum per query.

2. Provisioned capacity (Capacity Reservations). You reserve DPUs (Data Processing Units) and pay per DPU-hour (USD 0.30 in the pricing examples), whatever the queries scan. It suits steady, heavy workloads where predictable cost and dedicated capacity matter.

3. Athena for Apache Spark. Notebook and session workloads are billed per DPU-hour of compute used (USD 0.35 in the pricing examples), not by bytes scanned.

For SQL queries, cost falls when you scan less: store data as compressed Parquet, partition by the common filter and use partition projection for highly partitioned tables, select only needed columns, and use CTAS to write reusable results. Workgroups can limit how much data a query may scan.

Animated explanation
  1. 1Billedper bytes scanned, 10 MB minimum
  2. 2Parquet + compressionfewer bytes
  3. 3Partitions or projectionskip data
  4. 4Select columnsonly what you need
  5. 5CTAS and workgroupsreuse results, cap scans
Every saving is the same idea: scan fewer bytes.

Key points

  • bytes scanned
  • Parquet + compression
  • partitions / projection
  • column selection
  • workgroup limits

Common mistakes

  • Running SELECT * on wide tables and paying for every column.
  • Querying raw CSV or JSON instead of compressed, columnar Parquet.
  • Partitioning data but filtering on a different column, so the whole table is scanned.
  • Leaving many tiny files in a partition, which adds overhead and scan cost.
  • Assuming Athena always bills by bytes scanned and ignoring provisioned capacity or Spark billing.

Best practices

  • Convert data once to partitioned Parquet (or ORC) with CTAS and query the converted table.
  • Select only the columns you need and always filter on the partition column.
  • Use workgroups with a per-query data scan limit and track cost per team.
  • For a steady, heavy query load, compare on-demand cost with provisioned capacity.
  • Compact small files so that each partition holds fewer, larger files.

Likely follow-ups

  • When does it make sense to switch from on-demand to provisioned capacity?
  • What is partition projection and when do you use it?
  • How does CTAS help reduce the cost of repeated queries?
  • How do workgroups limit cost and separate teams?
  • Why does columnar storage like Parquet scan fewer bytes?

References

Discussion