A company that hosts its web application on AWS wants to ensure all Amazon EC2 instances, Amazon RDS DB instances and Amazon Redshift clusters are configured with tags. The company wants to minimize the effort of configuring and operating this check.
What should a solutions architect do to accomplish this?
A. Use AWS Config rules to define and detect resources that are not properly tagged.
B. Use Cost Explorer to display resources that are not properly tagged. Tag those resources manually.
C. Write API calls to check all resources for proper tag allocation. Periodically run the code on an EC2 instance.
D. Write API calls to check all resources for proper tag allocation. Schedule an AWS Lambda function through Amazon CloudWatch to periodically run the code.
A
技巧:排除明顯錯誤選項,在沒有明顯錯誤的選項中選擇最合理的選項。
一家在 AWS 上托管其 Web 應用程序的公司,希望確保所有 Amazon EC2 實例、Amazon RDS 數據庫實例和 Amazon Redshift 集群都配置了標簽。公司希望最小化配置和運營此檢查的工作量。
A. 正確。使用 AWS Config 規則來定義和檢測未正確標記的資源。AWS Config 是一項服務,它能夠評估、審計和評估 AWS 資源的配置。通過 AWS Config 規則,可以定義期望的資源配置(如特定的標簽策略),并自動檢測不符合這些規則的資源。使用 AWS Config 規則來檢測未正確標記的資源是一種自動化、可擴展且低維護的解決方案。AWS Config 會持續監控資源,并在發現不符合規則的資源時生成合規性報告或通知。這種方法最小化了配置和運營此檢查的工作量,因為一旦規則設置完成,AWS Config 將自動執行檢查。
B. 不正確。使用 Cost Explorer 來顯示未正確標記的資源,并手動標記這些資源。Cost Explorer 是一項 AWS 服務,主要用于分析 AWS 成本和使用情況。雖然它可能提供一些關于資源使用情況的見解,但它并不直接用于檢測或管理資源的標簽。此外,手動標記資源不僅耗時且容易出錯。
C. 不正確。編寫 API 調用來檢查所有資源是否分配了正確的標簽,并定期在 EC2 實例上運行代碼。編寫 API 調用來檢查資源標簽是一種可行的方法,但在 EC2 實例上定期運行此代碼需要額外的管理和維護工作。需要確保 EC2 實例始終運行、配置正確,并且有足夠的權限來執行檢查。這種方法增加了配置和運營此檢查的工作量。
D. 不正確。編寫 API 調用來檢查所有資源是否分配了正確的標簽,并通過 Amazon CloudWatch 安排 AWS Lambda 函數定期運行代碼。編寫 API 調用來檢查資源標簽是合理的,但是與 AWS Config 規則相比,這種方法仍然需要更多的初始設置和維護(例如,編寫和測試 Lambda 函數代碼、設置 CloudWatch 事件等)。