Advertisement
Beginner AWS, Amazon Athena

How does Athena pricing work, and how can you reduce query costs?

Short answer

Athena charges based on the amount of data scanned by each query, so you can reduce costs significantly by converting your data into a compressed columnar format like Parquet, partitioning your data by fields commonly used in filters such as date, and only selecting the specific…

Save AWS mock interview
Advertisement
AModel answer
Athena charges based on the amount of data scanned by each query, so you can reduce costs significantly by converting your data into a compressed columnar format like Parquet, partitioning your data by fields commonly used in filters such as date, and only selecting the specific columns you need instead of using select star.
CREATE TABLE sales_parquet WITH (format = 'PARQUET') AS SELECT * FROM sales_data;
Real-world example
A company reduces its monthly Athena bill by over seventy percent after converting its raw CSV log files into partitioned Parquet format, since each query then scans far less data.
Likely follow-ups
  • What is the difference between row based and columnar storage formats?
  • How do you set up data partitioning in Athena?
Related topics