

• 2026 年 4 月 30 日之後將不再提供 AWS Systems Manager CloudWatch Dashboard。客戶可以繼續使用 Amazon CloudWatch 主控台來檢視、建立和管理其 Amazon CloudWatch 儀表板，就像現在一樣。如需詳細資訊，請參閱 [Amazon CloudWatch Dashboard 文件](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch_Dashboards.html)。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# AWS Systems Manager Maintenance Windows
<a name="maintenance-windows"></a>

Maintenance Windows是 中的工具 AWS Systems Manager，可協助您定義何時對節點執行潛在破壞性動作的排程，例如修補作業系統、更新驅動程式，或安裝軟體或修補程式。

**注意**  
State Manager 和 Maintenance Windows 可以在受管節點上執行某些類似的更新。您選擇哪一項，取決於您是否需要在指定的期間內自動化系統合規，或執行高優先順序、時間敏感的任務。  
如需詳細資訊，請參閱[在 State Manager 與 Maintenance Windows 之間進行選擇](state-manager-vs-maintenance-windows.md)。

使用 Maintenance Windows，您可以在許多其他 AWS 資源類型上排程動作，例如 Amazon Simple Storage Service (Amazon S3) 儲存貯體、Amazon Simple Queue Service (Amazon SQS) 佇列、 AWS Key Management Service (AWS KMS) 金鑰等。

如需您可以在維護時段目標中包含的支援資源類型完整清單，請參閱*AWS Resource Groups 《 使用者指南*》中的[可與 AWS Resource Groups 和標籤編輯器搭配使用的資源](https://docs.aws.amazon.com/ARG/latest/userguide/supported-resources.html#supported-resources-console)。若要開始使用 Maintenance Windows，請開啟 [Systems Manager 主控台](https://console.aws.amazon.com//systems-manager/maintenance-windows)。在導覽窗格中，選擇 **Maintenance Windows**。

每個維護時段都有排程、最長持續時間、一組已註冊目標 （受管節點或其他處理 AWS 的資源），以及一組已註冊任務。當您建立或更新維護時段時，可以將標籤新增到您的維護時段。(標籤為索引鍵，可幫助識別和排序組織內的資源。) 您也可以指定不得在某日期之前或之後執行維護時段，亦可指定維護時段排程所依據的國際時區。

如需維護時段的各種排程相關選項彼此之間有何關聯的說明，請參閱 [維護時段排程與作用期間選項](maintenance-windows-schedule-options.md)。

如需使用 `--schedule` 選項的詳細資訊，請參閱[參考：Systems Manager 的 Cron 和 Rate 運算式](reference-cron-and-rate-expressions.md)。

**受支援任務類型**  
透過維護時段，您可以執行四種類型的任務：
+ Run Command (Systems Manager 中的工具) 中的命令

  如需 Run Command 的相關資訊，請參閱 [AWS Systems Manager Run Command](run-command.md)。
+ Automation (Systems Manager 中的工具) 中的工作流程

  如需自動化工作流程的相關詳細資訊，請參閱 [AWS Systems Manager 自動化](systems-manager-automation.md)。
+ 中的 函數 AWS Lambda

  如需有關 Lambda 函數的資訊，請參閱《AWS Lambda 開發人員指南》**中的 [Lambda 入門](https://docs.aws.amazon.com/lambda/latest/dg/getting-started.html)。
+ 中的任務 AWS Step Functions
**注意**  
維護時段任務僅支援 Step Functions 標準狀態機器工作流程。這些任務不支援快速狀態機器工作流程。如需有關狀態機器工作流程類型的資訊，請參閱《AWS Step Functions 開發人員指南》**中的[標準與快速工作流程](https://docs.aws.amazon.com/step-functions/latest/dg/concepts-standard-vs-express.html)。

  如需 Step Functions 的詳細資訊，請參閱《*[AWS Step Functions 開發人員指南](https://docs.aws.amazon.com/step-functions/latest/dg/)*》。

這表示您可以使用維護時段對所選目標執行類似下列任務。
+ 安裝或更新應用程式。
+ 套用修補程式。
+ 安裝或更新 SSM Agent
+ 藉由使用 Systems Manager Run Command 任務執行 PowerShell 命令和 Linux shell 指令碼。
+ 透過使用 Systems Manager Automation 任務以建置 Amazon Machine Images (AMIs)、啟動軟體和設定節點。
+ 執行叫用其他動作的 AWS Lambda 函數，例如掃描節點以取得修補程式更新。
+ 執行 AWS Step Functions 狀態機器來執行任務，例如從 Elastic Load Balancing 環境移除節點、修補節點，然後將節點新增回 Elastic Load Balancing 環境。
+ 透過指定 AWS 資源群組做為目標，將離線的節點設為目標。

**注意**  
必須為維護時段 Run Command 類型任務指定一或多個目標。視任務而定，其他維護時段任務類型 （自動化 AWS Lambda和 AWS Step Functions) 的目標為選用。如需有關執行未指定目標之任務的詳細資訊，請參閱 [註冊不含目標的維護時段任務](maintenance-windows-targetless-tasks.md)。

**支援 EventBridge**  
此 Systems Manager 工具作為 Amazon EventBridge 規則中的*事件*類型受到支援。如需詳細資訊，請參閱 [使用 Amazon EventBridge 監控 Systems Manager](monitoring-eventbridge-events.md) 及 [參考：Systems Manager 的 Amazon EventBridge 事件模式和類型](reference-eventbridge-events.md)。

**Topics**
+ [設定 Maintenance Windows](setting-up-maintenance-windows.md)
+ [使用主控台建立和管理維護時段](sysman-maintenance-working.md)
+ [教學](maintenance-windows-tutorials.md)
+ [註冊維護時段任務時使用虛擬參數](maintenance-window-tasks-pseudo-parameters.md)
+ [維護時段排程與作用期間選項](maintenance-windows-schedule-options.md)
+ [註冊不含目標的維護時段任務](maintenance-windows-targetless-tasks.md)
+ [對維護時段進行故障診斷](troubleshooting-maintenance-windows.md)