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 安裝。需手動選擇實例,無法自動檢測缺失軟件的實例。缺乏持續監控機制,無法確保所有實例始終符合要求。