认证考题 | 使用 AWS IAM Access Analyzer 检测来自外部账号的访问权限


  题目

A company uses an organization in AWS Organizations to manage hundreds of AWS accounts. Some of the accounts provide access to external AWS principals through cross-account IAM roles and Amazon S3 bucket policies. The company needs to identify which external principals have access to which accounts.
Which solution will provide this information?
A. Enable AWS Identity and Access Management Access Analyzer for the organization. Configure the organization as a zone of trust. Filter findings by AWS account ID.
B. Create a custom AWS Config rule to monitor IAM roles in each account. Deploy an AWS Config aggregator to a central account. Filter findings by AWS account ID.
C. Activate Amazon Inspector. Integrate Amazon Inspector with AWS Security Hub. Filter findings by AWS account ID for the IAM role resource type and the S3 bucket policy resource type.
D. Configure the organization to use Amazon GuardDuty. Filter findings by AWS account ID for the Discovery:IAMUser/AnomalousBehavior finding type.

  参考答案

A

  需求概括

一家公司使用 AWS Organizations 管理数百个 AWS 账户。部分账户通过跨账户 IAM 角色和 Amazon S3存储桶策略为外部 AWS 主体提供访问权限。公司需要识别哪些外部主体有权访问哪些账户。
如何高效识别跨账户场景下外部主体对 AWS 账户的访问权限?

  参考解析

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

A. 正确。为组织启用 AWS Identity and Access Management Access Analyzer。将组织配置为信任区域。按 AWS 账户 ID 过滤调查结果。Access Analyzer 可自动扫描跨账户 IAM 角色和存储桶策略,识别外部主体权限,并支持按账户 ID 聚合结果,完全满足需求。
B. 不正确。创建自定义 AWS Config 规则以监控每个账户中的 IAM 角色。将 AWS Config 聚合器部署到中央账户。按 AWS 账户 ID 过滤调查结果。需手动编写规则逻辑,且无法直接识别外部主体(如组织外账户),仅能监控配置合规性,效率低于 Access Analyzer。
C. 不正确。激活 Amazon Inspector。将 Amazon Inspector 与 AWS Security Hub 集成。按 AWS 账户 ID 过滤 IAM 角色资源类型和 S3存储桶策略资源类型的调查结果。Inspector 不提供权限分析功能,集成 Security Hub 后仍需依赖其他服务(如 Access Analyzer)生成数据。
D. 不正确。配置组织使用 Amazon GuardDuty。按 AWS 账户 ID 过滤 Discovery:IAMUser/AnomalousBehavior 发现类型。GuardDuty 用于检测异常行为(如未授权访问),而非静态权限分析,无法识别合法但不必要的外部主体权限。

  技术总结

AWS IAM Access Analyzer:可扫描 IAM 角色和存储桶策略,识别外部主体(如其他 AWS 账户或组织外实体)的访问权限,并生成可审计的报告。
AWS Config:通过自定义规则可监控 IAM 角色和存储桶策略的配置,但需手动编写规则逻辑,且无法直接聚合跨账户的外部主体信息。
Amazon Inspector:专注于漏洞扫描,不直接提供权限分析功能。
AWS Security Hub:可聚合安全发现,但依赖其他服务(如 Access Analyzer)提供原始数据。
Amazon GuardDuty:主要用于检测异常行为(如暴力破解),不提供权限静态分析功能。