Cost-Effective SQL Queries on Encrypted Parquet in S3
Short answer
A Configure Amazon Athena to read the encrypted files and run SQL queries directly on the data in Amazon S3.
Question
Key Takeaways
The core concept tested is selecting the right managed analytics service for ad-hoc SQL on S3 data, with the common trap being the assumption that S3 Select or Redshift Spectrum are cheaper than Athena for simple, occasional workloads.
This question evaluates the most cost-effective method for running occasional SQL queries on client-side encrypted Apache Parquet files stored in Amazon S3. The correct solution leverages a serverless query service that natively supports encryption handling without infrastructure management.
Common mistake: Many learners choose Option B (S3 Select) because it appears simpler and potentially cheaper, but S3 Select does not support complex SQL aggregations like moving averages or client-side KMS decryption efficiently for this use case compared to Athena's broader SQL engine capabilities.
Expert Analysis
Why the Answer Is Correct
Amazon Athena is the most cost-effective solution because it is serverless, meaning you pay only for the queries run (per TB scanned). It natively supports Apache Parquet format and can handle Client-Side Encryption with KMS (CSE-KMS) by using the AWS SDKs or by configuring the Glue Data Catalog metadata correctly if the key access is managed via IAM roles that assume permissions to decrypt. Since the queries are "occasional" and involve "moving averages" (aggregations), Athena provides the necessary SQL engine power without the overhead of managing clusters.
Why the Other Options Are Wrong
Option B (S3 Select) is limited to retrieving subsets of data from objects using simple SQL; it does not support complex aggregations like moving averages across multiple rows effectively for this specific analytical need, nor does it easily handle CSE-KMS for arbitrary SQL queries in the same flexible way Athena does for structured data analysis. Option C (Redshift Spectrum) involves setting up a Redshift cluster, which incurs hourly costs regardless of usage, making it significantly more expensive for "occasional" queries. Option D (EMR Serverless) requires managing Spark jobs and cluster configurations, adding operational complexity and cost compared to a simple serverless SQL interface like Athena.
Community Comment Notes
Community consensus heavily favors Athena, noting its suitability for Parquet and cost-effectiveness. One commenter pointed out that "Athena is serverless... super cost-effective because you only pay for the amount of data scanned." Another highlighted that Athena works perfectly with Parquet files. A dissenting voice argued that options A, B, and C do not support CSE-KMS directly, but this is incorrect as Athena can be configured to work with encrypted data through proper IAM and encryption context setups, or by assuming the keys are accessible. The majority correctly identified that for occasional SQL on S3, Athena is the standard answer.
Official Reference
https://docs.aws.amazon.com/athena/latest/ug/querying-s3-data-files.html
This link opens the official vendor documentation in a new tab.
Exam Strategy
Always look for 'serverless' and 'pay-per-use' keywords when 'cost-effective' and 'occasional' are specified. If the task involves SQL on S3 data (especially Parquet/ORC), Athena is usually the primary candidate unless the volume is massive and continuous (then consider Redshift Spectrum) or extremely simple (S3 Select).
Frequently Asked Questions
Does Athena support Client-Side Encryption with KMS?
Why is S3 Select not better for this scenario?
Community Votes
100% of anonymous learners picked answer A. Votes are pick records left by other test-takers — they are not the verified answer.
Discussion 7 contributions
Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.
From public community threads 7
-
LeonSauveterre 👍 2 Answered ASeems like "sample moving averages" is a typo of "simple moving averages". A simple moving average is formed by computing the average price of a security over a specific number of periods, but let's just ignore it if you don't care one bit haha A - Athena is serverless, works perfectly with Parquet files, can handle encrypted data, and super cost-effective because you only pay for the amount of data you query. B - Amazon S3 Select is fast for simple filtering or lightweight queries, not for complex queries like calculating moving averages. C - Redshift with Redshift Spectrum is extremely powerful and competent to crunch heavy-duty data, so overkill for occasional SQL queries. D - EMR is scalable and fast but is usually for heavy data pipelines, not casual SQL analysis. Like C, this is overkill.
-
Ronanh 👍 2A. Athena would be overkill and more expensive for simple queries on specific files. C. Amazon Redshift with Redshift Spectrum would be significantly more complex and costly to set up and maintain for occasional queries. D. EMR Serverless with Apache SparkSQL would also be more complex and likely more expensive for this use case. S3 Select provides the right balance of functionality and cost-effectiveness for the described scenario, making it the most suitable choice
-
EllenLiu 👍 1 Answered Ait is a simple SQL just in S3, believe it is a use case of Athena which supports client-side decryption
-
FlyingHawk 👍 1 Answered Ahttps://aws.amazon.com/blogs/storage/how-to-optimize-querying-your-data-in-amazon-s3/
-
Cpso 👍 1 Answered DKey: CSE-KMS A,B,C not support decrypted by CSE-KMS
Show 2 more comments
-
swati1508 👍 3 Answered AAthena for sql
-
dhewa 👍 2 Answered AA is my choice.
Reader comments & corrections
No reader corrections yet — spotted an error or have a note? Share it below.
Related Analysis
Practice All SAA-C03 Questions
Access 120 questions with complete answers and detailed explanations.
View Full SAA-C03 Practice Test →