Exams / SAA-C03 / Streaming and analytics / Question 2
SAA-C03 practice question: Streaming and analytics (2 of 2)
Design High-Performing Architectures A free question from our original SAA-C03 practice exam. Try it, then open the answer to see why each option is right or wrong.
A research team stores 40 TB of application logs in Amazon S3 as Parquet files, partitioned by date. Analysts run a few ad hoc SQL queries each week, and most queries look at only one or two days of data. The company does not want to copy the data into another data store, and it wants to pay nothing for compute when no queries are running. Which solution is the MOST cost-effective?
Choose one answer.
- AA. Define the data as a partitioned table in the AWS Glue Data Catalog, and query it in place with Amazon Athena.
- BB. Load the files into a provisioned Amazon Redshift cluster with the COPY command, and run the analysts' SQL queries against the cluster's tables.
- CC. Create external tables in a provisioned Amazon Redshift cluster, and query the Parquet files where they are with Amazon Redshift Spectrum.
- DD. Launch a long-running Amazon EMR cluster with Trino installed, and query the Parquet files in S3 from the cluster when needed.
Show the answer and explanation
Answer: A
- A. Right: Correct. Athena is serverless and queries data where it sits in S3, billing by the data each query scans. Filtering on the date partition means only the matching days are read, and Parquet lets Athena read only the needed columns, so a few small queries a week cost very little. Learn more: Optimize data (opens in a new tab)
- B. Wrong: A Redshift cluster gives fast SQL over large data sets, but COPY loads the data into Redshift, which breaks the no-copy requirement. A provisioned cluster is also billed for every hour it runs, even in the many hours between the weekly queries. Learn more: Amazon Redshift Spectrum (opens in a new tab)
- C. Wrong: Redshift Spectrum queries files in S3 without loading them, so it meets the no-copy requirement. However, it runs through a Redshift cluster, and a provisioned cluster is billed while it runs whether or not anyone is querying, which is costly for a few queries a week. Learn more: Amazon Redshift Spectrum (opens in a new tab)
- D. Wrong: Trino on EMR can query Parquet files in S3 in place, so no copy is needed. But a long-running cluster is billed for its instances all week and needs to be sized and maintained, which costs far more than a serverless service for occasional queries. Learn more: Trino on Amazon EMR (opens in a new tab)
Explanation
For occasional SQL over data already in S3, Amazon Athena is the cheapest fit: there is nothing to run between queries, and each query is charged by the data it scans. Partitioning by date and storing Parquet both cut the data scanned, so queries over one or two days are small. The Redshift and EMR options either copy the data or keep a cluster running all week.
Study
Keep practising
Answer questions with a score at the end, or practise just this topic with the explanation after each one. No sign-up needed.