A security engineer is configuring a mechanism to send an alert when three or more failed sign-in attempts to the AWS Management Console occur during a 5-minute period. The security engineer creates a trail in AWS CloudTrail to assist in this work.
Which solution will meet these requirements?
A. In CloudTrail, turn on Insights events on the trail. Configure an alarm on the insight with eventName matching ConsoleLogin and errorMessage matching "Failed authentication''. Configure a threshold of 3 and a period of 5 minutes.
B. Configure CloudTrail to send events to Amazon CloudWatch Logs. Create a metric filter for the relevant log group. Create a filter pattern with eventName matching ConsoleLogin and errorMessage matching "Failed authentication". Create a CloudWatch alarm with a threshold of 3 and a period of 5 minutes.
C. Create an Amazon Athena table from the CloudTrail events. Run a query for eventName matching ConsoleLogin and for errorMessage matching "Failed authentication". Create a notification action from the query to send an Amazon Simple Notification Service (Amazon SNS) notification when the count equals 3 within a period of 5 minutes.
D. In AWS Identity and Access Management Access Analyzer, create a new analyzer. Configure the analyzer to send an Amazon Simple Notification Service (Amazon SNS) notification when a failed sign-in event occurs 3 times for any IAM user within a period of 5 minutes.
B
一名安全工程师正在配置一种机制,当在 5 分钟内发生 3 次或更多 AWS 管理控制台登录失败尝试时发送警报。该安全工程师在 AWS CloudTrail 中创建了一个跟踪以协助完成此项工作。需要选择一种解决方案,通过 CloudTrail 跟踪数据,在 5 分钟内检测到 3 次或以上控制台登录失败时触发警报。哪个解决方案将满足这些要求?
AWS CloudTrail:用于记录 AWS 账户中的 API 调用和相关事件。
CloudWatch Logs:可以接收和存储来自不同来源(如 CloudTrail)的日志,并支持通过指标过滤器创建自定义指标和警报。
Amazon Athena:是一种交互式查询服务,允许使用标准 SQL 直接查询存储在 Amazon S3 中的数据。
AWS Identity and Access Management (IAM) Access Analyzer:用于分析 AWS 资源上的访问权限,帮助识别意外的访问权限。
技巧:排除明显错误选项,在没有明显错误的选项中选择最合理的选项。
A. 不正确。在 CloudTrail 中,在跟踪上启用 Insights 事件。针对洞察(insight)配置一个警报,eventName 匹配 ConsoleLogin 且 errorMessage 匹配“Failed authentication”。配置阈值为 3,周期为 5 分钟。CloudTrail Insights 主要用于检测异常的 API 使用模式,而不是专门针对特定事件(如登录失败)进行计数和警报。
B. 正确。配置 CloudTrail 将事件发送到 Amazon CloudWatch Logs。为相关的日志组创建一个指标过滤器。创建一个过滤模式,eventName 匹配 ConsoleLogin 且 errorMessage 匹配“Failed authentication”。创建一个 CloudWatch 警报,阈值为 3,周期为 5 分钟。该方案通过将 CloudTrail 事件发送到 CloudWatch Logs,可以使用指标过滤器对特定事件进行计数,并设置警报,当在指定周期内达到阈值时触发警报,符合题目要求。
C. 不正确。从 CloudTrail 事件创建一个 Amazon Athena 表。运行一个查询,eventName 匹配 ConsoleLogin 且 errorMessage 匹配“Failed authentication”。当在 5 分钟内计数等于 3 时,从查询创建一个通知操作以发送 Amazon Simple Notification Service (Amazon SNS) 通知。
使用该方案,虽然 Athena 可以查询 CloudTrail 事件,但需要额外的逻辑来定时运行查询并检测计数是否达到阈值,不如 CloudWatch Logs 的指标过滤器和警报直接和方便,不是最佳解决方案。
D. 不正确。在 AWS Identity and Access Management Access Analyzer 中,创建一个新的分析器。配置分析器,当在任何 IAM 用户在 5 分钟内发生 3 次失败的登录事件时,发送 Amazon Simple Notification Service (Amazon SNS) 通知
IAM Access Analyzer 主要用于分析访问权限,而不是用于检测登录失败事件并发送警报。