CertificationTestPrep Free diagnostic

AWS · explainer · checked November 4, 2026

Athena vs Redshift: query data in S3 or run a data warehouse

Amazon Athena runs standard SQL directly on data in Amazon S3 with nothing to set up, which suits ad hoc queries. Amazon Redshift is a petabyte-scale data warehouse for complex queries with many joins across large tables of historical data. RDS and DynamoDB serve applications that read and write individual records, which is a different job.

Side by side

Amazon AthenaAmazon Redshift
What it isInteractive query service for data in Amazon S3Fully managed, petabyte-scale data warehouse
Where the data livesStays in Amazon S3; you define a table and query itLoaded into Redshift storage; Spectrum can also query files in S3
InfrastructureServerless; no clusters to manageRedshift Serverless, or provisioned clusters that you manage
How you payBased on data processed, or reserved DPU capacityServerless: compute capacity in RPUs plus storage. Provisioned: the cluster you run
Best atQuick ad hoc queries, log analysis, exploring data you have not loadedComplex queries that join many large tables; reports on historical data from many sources

Two ways to ask SQL questions of big data

Both services answer analytic questions with SQL, which means queries that read many rows and summarize them. The difference is where the data sits and who runs the machinery.

Amazon Athena is an interactive query service for data directly in Amazon S3. You point it at your files, define a table, and run standard SQL. It reads CSV, JSON, and columnar formats such as Apache Parquet and Apache ORC, and it does not need the data to be loaded or aggregated first. Amazon Redshift is a fully managed, petabyte-scale data warehouse: you load data into it and it stores the data in a form tuned for analysis.

When to pick Athena

AWS says to use Athena when you want to run interactive, ad hoc SQL queries against data on Amazon S3 without managing any infrastructure or clusters. Its own example is a quick query on web logs to troubleshoot a performance problem.

Athena is serverless and scales automatically, running queries in parallel. It uses the AWS Glue Data Catalog as a central metadata store, and BI tools and SQL clients can connect through JDBC or ODBC. Athena also runs Apache Spark code without clusters to plan or configure.

The bill follows usage. SQL queries are billed on the amount of data processed, and a capacity reservation option bills for reserved DPU capacity instead. S3 storage, Glue Data Catalog and federated query Lambda charges are separate. Because the charge follows data scanned, a columnar format such as Parquet helps: Athena reads only the columns a query needs, while text formats must be read in full. Compression also cuts the data scanned.

When to pick Redshift

AWS describes a data warehouse as the best choice when you need to pull together data from many sources, such as inventory, financial and retail sales systems, into a common format and keep it for a long time. Redshift is tuned for complex queries that join many very large tables over highly structured data, and for business reports built on historical data.

Three techniques together give it speed: massively parallel processing, columnar data storage, and compression. Columnar storage matters because analytic queries usually read a few columns across a very large number of rows. The documentation’s example is a 100-column table where a query that uses five columns reads about five percent of the data.

Redshift comes in two forms. Amazon Redshift Serverless provisions and scales capacity for you and stops charging for compute when the warehouse is idle. Compute is measured in Redshift Processing Units (RPUs), billed per second with a 60-second minimum. You can buy on-demand capacity, or a reservation when usage is steady. Storage is billed separately by GB per month. If you prefer to manage resources yourself, you can create provisioned clusters.

Redshift Spectrum and where the two meet

Redshift Spectrum lets Redshift query structured and semi-structured files in Amazon S3 without loading them into Redshift tables. Much of the processing happens in the Spectrum layer, most data stays in S3, and multiple clusters can query the same dataset without copies. In Redshift Serverless there is no separate charge for data lake queries: they are charged by transaction time, like queries on local data.

So a common design keeps recent, frequently queried data in Redshift tables and older or rarely queried files in S3. The services also work together outside that: Athena can query data that Amazon EMR processes, and Amazon SageMaker Unified Studio runs SQL against both Athena and Redshift.

RDS and DynamoDB are not warehouses

The searches “RDS vs Redshift” and “DynamoDB vs Redshift” compare databases built for different jobs.

Amazon Relational Database Service (Amazon RDS) sets up, operates and scales a relational database for an application. It runs IBM Db2, MariaDB, Microsoft SQL Server, MySQL, Oracle Database or PostgreSQL. Row-wise storage is the right layout for online transaction processing (OLTP), where transactions read and write whole records, a few at a time. The Redshift documentation says this directly: row-wise storage is optimal for OLTP databases, and data warehouse queries read a few columns for a very large number of rows, which is why Redshift stores by column. Use RDS to run the application; use Redshift to analyze data from it.

Amazon DynamoDB is a serverless NoSQL database with single-digit millisecond performance at any scale, built for operational workloads. It does not support a JOIN operator, and AWS recommends denormalizing the data model to cut round trips. That is the opposite of the many-table joins Redshift is tuned for.

They connect rather than compete. DynamoDB supports zero-ETL integration with Redshift for analytics on table data, and it can export tables to Amazon S3 for analytics and machine learning. A common pattern, described here as advice rather than an AWS statement, is an operational database for the application and an analytics service for the questions asked of its history.

On the exams

How certification exams use this

The exam guides ask candidates to pick data services by workload. DEA-C01 asks for SQL in Redshift and Athena to query data or create views (skill 3.2.3), querying data with Athena (3.1.7), storage services for cost and performance (2.1.1, naming Redshift, RDS and DynamoDB), and Redshift Spectrum and federated queries for remote access (2.1.5). SAP-C03 asks for serverless analysis pipelines with Athena (1.1.3), data lake architectures with Redshift Spectrum (1.5.1), and database selection by access pattern (1.5.3). SAA-C03 names Athena for data analytics services (3.5.k1) and database types and cost (4.3.s3). CLF-C02 asks candidates to identify analytics services (3.7.s2). Watch the wording: “ad hoc queries on data already in S3 with no infrastructure” points at Athena, “complex joins across large historical tables” points at Redshift, and individual record reads and writes point at RDS or DynamoDB. The usual wrong answer is a warehouse for transactional work or a transactional database for analytics.

Test yourself

See how well you know it, free.

Each exam’s diagnostic is free, with no sign-in: questions across the whole exam, and a map of what you know and what you don’t.