认证考题 | 使用 Amazon QuickSight 实现可视化监测 ALB 访问日志


  题目

A company needs to analyze access logs for an Application Load Balancer (ALB). The ALB directs traffic to the company’s online login portal. The company needs to use visualizations to identify login attempts by bots from a list of known IP sources.
Which solution will meet these requirements?
A. Configure the ALB to send logs directly to Amazon CloudWatch Logs. Analyze and visualize the logs by using CloudWatch Logs Insights.
B. Configure the ALB to send logs directly to Amazon Redshift. Analyze the logs by using SQL queries. Visualize the logs by using custom reports.
C. Configure the ALB to send logs directly to Amazon OpenSearch Service. Analyze the logs by using OpenSearch dashboards. Visualize the logs by using custom OpenSearch dashboards.
D. Configure the ALB to send logs directly to an Amazon S3 bucket. Analyze the logs by using Amazon Athena. Visualize the logs by using Amazon QuickSight.

  参考答案

D

  需求概括

一家公司需要分析其应用负载均衡器(ALB)的访问日志。该 ALB 将流量导向公司的在线登录门户。公司需通过可视化工具识别来自已知恶意 IP 源的机器人登录尝试。
如何高效存储、分析并可视化 ALB 日志,以检测特定 IP 的机器人登录行为。

  参考解析

技巧:排除明显错误选项,在没有明显错误的选项中选择最合理的选项。

A. 不正确。配置 ALB 直接将日志发送至 Amazon CloudWatch Logs,使用 CloudWatch Logs Insights 分析和可视化日志。CloudWatch Logs Insights 支持查询,但可视化功能较弱,需手动编写查询,且无法直接生成针对已知 IP 的仪表板。
B. 不正确。配置 ALB 直接将日志发送至 Amazon Redshift,使用 SQL 查询分析日志,并通过自定义报表可视化。Redshift 适合大规模分析,但配置复杂,成本高,且需手动编写 SQL 和创建报表,不适合快速检测机器人登录。
C. 不正确。配置 ALB 直接将日志发送至 Amazon OpenSearch Service,使用 OpenSearch 仪表板分析和可视化日志。OpenSearch 适合复杂搜索和日志分析,但配置和维护成本高,且可视化需手动创建仪表板,不如 QuickSight 便捷。
D. 正确。配置 ALB 直接将日志发送至 Amazon S3桶,使用 Amazon Athena 分析日志,并通过 Amazon QuickSight 可视化。此方案利用 S3存储日志,Athena 无服务器查询,QuickSight 快速可视化,可高效检测已知 IP 的机器人登录尝试,符合需求。

  技术总结

日志存储与处理:
ALB 日志存储:ALB 默认支持将日志发送至 S3桶,便于长期存储和后续分析。
Amazon Athena:可直接查询 S3中的日志文件,无需预处理,适合交互式分析。
可视化工具:
Amazon QuickSight:支持从 Athena 等数据源直接导入数据,提供拖拽式仪表板创建,适合快速可视化已知 IP 的登录趋势。
CloudWatch Logs Insights:适合实时日志查询,但可视化功能有限,需手动编写查询语句。
Redshift:适合大规模数据仓库,但配置复杂,成本较高,且需手动编写 SQL 和创建报表。
OpenSearch Service:适合复杂搜索和日志分析,但配置和维护成本高于 Athena+QuickSight 组合。