Amazon EC2 Systems Manager
User Guide

Creating a Maintenance Window

Creating a Maintenance Window requires that you complete the following tasks:

  • Create one or more SSM command documents that define the tasks to perform on your instances during the Maintenance Window. For information about how to create an SSM command document, see Creating Systems Manager Documents.

  • Create the Maintenance Window and define its schedule.

  • Register targets for the Maintenance Window. Targets can either be instance IDs or EC2 tags.

  • Register one or more tasks (SSM command documents) with the Maintenance Window.

After you complete these tasks, the Maintenance Window runs according to the schedule you defined and executes the tasks in your SSM documents on the targets you specified. After a task completes, Systems Manager logs the details of the execution.

Before you create a Maintenance Window, you must configure a Maintenance Window role with an Amazon Resource Name (ARN). For more information, see Configuring Roles and Permissions for Maintenance Windows.

You can create a Maintenance Window using the Maintenance Window page in the Amazon EC2 console, the AWS CLI, the Systems Manager API, or the AWS SDKs. For examples of how to create a Maintenance Window, see the Systems Manager Maintenance Window Walkthroughs.