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集群需要配置和管理,這對于簡單且按需的查詢來說過于復雜和昂貴。