A company needs the ability to analyze the log files of its proprietary application. The logs are stored in JSON format in an Amazon S3 bucket. Queries will be simple and will run on-demand. A solutions architect needs to perform the analysis with minimal changes to the existing architecture.
What should the solutions architect do to meet these requirements with the LEAST amount of operational overhead?
A. Use Amazon Redshift to load all the content into one place and run the SQL queries as needed.
B. Use Amazon CloudWatch Logs to store the logs. Run SQL queries as needed from the Amazon CloudWatch console.
C. Use Amazon Athena directly with Amazon S3 to run the queries as needed.
D. Use AWS Glue to catalog the logs. Use a transient Apache Spark cluster on Amazon EMR to run the SQL queries as needed.
C
技巧:排除明显错误选项,在没有明显错误的选项中选择最合理的选项。
某公司的日志保存在 S3 存储桶中,公式要求 AWS 工程师提供一个既高效又简便的方案,实现尽量减少对现有架构的改动,同时又可以最大成都降低运营开销。
A. 不正确。使用Amazon Redshift将所有内容加载到一个地方并运行SQL查询。Redshift是一个数据仓库服务,适合处理大规模数据集和复杂分析。但是,将日志数据从S3加载到Redshift需要数据转换和ETL(提取、转换、加载)过程,这会增加运营开销,而且对于简单且按需运行的查询来说可能过于复杂。
B. 不正确。使用Amazon CloudWatch Logs存储日志,并从Amazon CloudWatch控制台运行SQL查询。CloudWatch Logs主要用于监控和日志收集,而不是用于执行SQL查询。它不支持直接从控制台运行SQL查询。
C. 正确。使用Amazon Athena直接从Amazon S3运行查询。Athena是一个交互式查询服务,允许用户直接使用标准的SQL查询从Amazon S3中的数据进行分析,它非常适合处理存储在S3中的JSON格式日志数据,因为Athena可以直接解析这些文件。此外,Athena是按需付费的,没有额外的服务器或集群管理开销,非常适合简单且按需的查询需求。
D. 不正确。使用AWS Glue对日志进行编目,并使用Amazon EMR上的瞬态Apache Spark集群运行SQL查询。AWS Glue是一个ETL服务,用于数据准备和转换。虽然它可以用来编目日志数据,但使用Amazon EMR和Apache Spark集群来运行查询会增加复杂性和运营开销。Spark集群需要配置和管理,这对于简单且按需的查询来说过于复杂和昂贵。