A company has AWS accounts in an organization in AWS Organizations. The company needs to install a corporate software package on all Amazon EC2 instances for all the accounts in the organization. A central account provides base AMIs for the EC2 instances. The company uses AWS Systems Manager for software inventory and patching operations. A security engineer must implement a solution that detects EC2 instances that do not have the required software. The solution also must automatically install the software if the software is not present.
Which solution will meet these requirements?
A. Provide new AMIs that have the required software pre-installed. Apply a tag to the AMIs to indicate that the AMIs have the required software. Configure an SCP that allows new EC2 instances to be launched only if the instances have the tagged AMIs. Tag all existing EC2 instances.
B. Configure a custom patch baseline in Systems Manager Patch Manager. Add the package name for the required software to the approved packages list. Associate the new patch baseline with all EC2 instances. Set up a maintenance window for software deployment.
C. Centrally enable AWS Config. Set up the ec2-managedinstance-applications-required AWS Config rule for all accounts. Create an Amazon EventBridge rule that reacts to AWS Config events. Configure the EventBridge rule to invoke an AWS Lambda function that uses Systems Manager Run Command to install the required software.
D. Create a new Systems Manager Distributor package for the required software. Specify the download location. Select all EC2 instances in the different accounts. Install the software by using Systems Manager Run Command.
C
一家公司在 AWS Organizations 中的一个组织中拥有多个 AWS 账户。该公司需要在组织中所有账户的所有 Amazon EC2 实例上安装一个企业软件包。一个中央账户为 EC2 实例提供基础 AMI(Amazon Machine Image)。该公司使用 AWS Systems Manager 进行软件库存和补丁管理操作。安全工程师必须实施一个解决方案,能够检测未安装所需软件的 EC2 实例,并在软件缺失时自动安装该软件。以下哪个解决方案能满足这些要求?
该公司需要在组织内所有 AWS 账户的 EC2 实例上自动检测并安装指定企业软件,要求解决方案具备以下能力。
检测缺失软件:识别未安装目标软件的 EC2 实例。
自动安装软件:对缺失软件的实例自动触发安装。
兼容现有架构:利用中央账户提供的基础 AMI 和 AWS Systems Manager 进行管理。
检测与自动化:需通过持续监控或事件驱动机制发现缺失软件,并触发自动安装。
跨账户管理:解决方案需支持对组织内所有账户的 EC2 实例统一操作。
AWS 工具集成:需结合 AWS Systems Manager(软件库存、Run Command)、AWS Config(合规性监控)或 EventBridge(事件驱动自动化)。
技巧:排除明显错误选项,在没有明显错误的选项中选择最合理的选项。
A. 不正确。提供预装了所需软件的新 AMI,并为 AMI 添加标签以表明其已预装所需软件。配置服务控制策略(SCP),仅允许使用带有标签的 AMI 启动新的 EC2 实例。为所有现有 EC2 实例添加标签。该方案通过预装软件的 AMI 和 SCP 策略强制使用特定 AMI,并手动标记现有实例。仅限制新实例使用预装 AMI,无法检测或修复已存在但未标记的实例。依赖手动标记现有实例,无法自动化处理后续新增实例。
B. 不正确。在 Systems Manager Patch Manager 中配置自定义补丁基准,将所需软件包名称添加到批准的包列表中。将新补丁基准与所有 EC2 实例关联。设置用于软件部署的维护窗口。该方案通过 Systems Manager Patch Manager 配置自定义补丁基准,将软件包加入批准列表,并设置维护窗口。Patch Manager 主要用于补丁和标准软件更新,需软件包存在于公共仓库(如 YUM/APT),而企业软件可能为私有包。另外,维护窗口需手动触发或定时执行,无法实时响应缺失软件的情况。
C. 正确。集中启用 AWS Config。为所有账户设置 ec2-managedinstance-applications-required 的 AWS Config 规则。创建一个对 AWS Config 事件作出反应的 Amazon EventBridge 规则。配置 EventBridge 规则以调用 AWS Lambda 函数,该函数使用 Systems Manager Run Command 安装所需软件。AWS Config 监控所有账户的 EC2 实例是否安装指定软件(通过 ec2-managedinstance-applications-required 规则),EventBridge 捕获 AWS Config 的合规性事件(如检测到缺失软件),Lambda 函数调用 Systems Manager Run Command 自动安装软件。该方案完全满足实时监测、自动化修复、统一管理组织内所有账户的需求。
D. 不正确。为所需软件创建一个新的 Systems Manager Distributor 包,指定下载位置。选择不同账户中的所有 EC2 实例。使用 Systems Manager Run Command 安装软件。该方案通过 Systems Manager Distributor 分发软件包,并手动选择实例使用 Run Command 安装。需手动选择实例,无法自动检测缺失软件的实例。缺乏持续监控机制,无法确保所有实例始终符合要求。