These questions are independently created for study purposes. They are not official AWS exam questions, actual exam questions, leaked questions, or exam dumps.
SAA-046
You want to run ad hoc SQL analysis just a few times a month on several TB of access logs accumulated in S3. If you want to avoid the always-on cost and infrastructure management of an analytics platform, which service is the most appropriate?
Choices
Explanation and answer
Read the explanation and correct answer (spoiler — try answering first)
Correct answer: B. Run SQL queries directly against the data in S3 with Amazon Athena
Explanation
Amazon Athena is a serverless query service that runs SQL directly against data in S3 and charges only for the amount of data scanned. Because no cluster needs to be built or kept running, it is the best fit for infrequent ad hoc analysis.
Per-choice explanations
A. Ingest the logs into an Amazon RDS for PostgreSQL instance and aggregate them with SQL
Incorrect. RDS is billed as an always-on instance, and it also requires processing to ingest several TB of logs and securing storage. It is not suited to ad hoc analysis.
B. Run SQL queries directly against the data in S3 with Amazon Athena
Correct. Once you register table definitions in the Glue Data Catalog, you can query immediately while leaving the data in S3.
C. Create an Amazon Redshift provisioned cluster, load the logs, and query them
Incorrect. A Redshift provisioned cluster is billed the entire time it is running. It also requires loading the logs, which is excessive for a few uses per month.
D. Launch an Amazon EMR cluster and aggregate the data with Spark SQL
Incorrect. An EMR cluster can be operated only when needed, but it requires cluster configuration management and job implementation, which is excessive operational burden when SQL analysis is the only goal.
Practical Use
Amazon Athena is a serverless query service that runs standard SQL directly against data stored in S3. You do not need to load data into another database; you can query simply by registering the table schema in the AWS Glue Data Catalog. It supports formats such as CSV, JSON, ORC, Parquet, and Avro, and is widely used for analyzing AWS-generated logs such as CloudTrail logs, VPC Flow Logs, ALB access logs, and CloudFront logs. Billing is usage-based on the amount of data a query scans, with no charge for cluster uptime. What drives cost and performance is how much you can reduce the scanned volume. Converting data to a columnar format such as Parquet or ORC dramatically reduces scanned volume compared with CSV or JSON because only the needed columns are read. In addition, if you partition S3 keys by year / month / day and specify the partition columns in the WHERE clause, files outside the target range are not read at all. As data grows, combine compression (Snappy / GZIP) as well. Among analytics options, Amazon Redshift suits repeated, standardized dashboards and BI use cases that need sub-second responses, while Amazon EMR and AWS Glue suit large-scale ETL and machine learning preprocessing. On SAA-C03, keywords such as "analyze data in S3 with SQL as-is," "start serverless," "ad hoc analysis," and "pay only for what you query" point to Athena. Distractors include a Redshift cluster (always-on cost), loading into RDS (ingestion burden), and an EMR cluster (operational burden). Conversely, it is worth remembering that conditions such as "perform large aggregations quickly on a daily basis" or "many users viewing dashboards concurrently" make Redshift the correct answer.