Working with the Amazon DMS maintenance window - Amazon Database Migration Service
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Working with the Amazon DMS maintenance window

Every Amazon DMS replication instance has a weekly maintenance window during which any available system changes are applied. You can think of the maintenance window as an opportunity to control when modifications and software patching occurs.

If Amazon DMS determines that maintenance is required during a given week, the maintenance occurs during the 30-minute maintenance window you chose when you created the replication instance. Amazon DMS completes most maintenance during the 30-minute maintenance window. However, a longer time might be required for larger changes.

Effect of maintenance on existing migration tasks

When an Amazon DMS migration task is running on an instance, the following events occur when a patch is applied:

  • If the tables in the migration task are in the replicating ongoing changes phase (CDC), Amazon DMS stops the task for a moment and then resumes it after the patch is applied. The migration then continues from where it was interrupted when the patch was applied.

  • If Amazon DMS is migrating a table as part of a migrate existing data or migrate existing data and replicate ongoing changes task, DMS stops and then restarts the migration for all tables that are in full load phase while the patch is applied. DMS also stops and resumes all tables that are in CDC phase while the patch is applied.

Changing the maintenance window setting

You can change the maintenance window time frame using the Amazon Web Services Management Console, the Amazon CLI, or the Amazon DMS API.

You can change the maintenance window time frame using the Amazon Web Services Management Console.

To change the preferred maintenance window using the console
  1. Sign in to the Amazon Web Services Management Console and open the Amazon DMS console at https://console.amazonaws.cn/dms/v2/.

  2. In the navigation pane, choose Replication instances.

  3. Choose the replication instance you want to modify and choose Modify.

  4. Expand the Maintenance tab and choose a date and time for your maintenance window.

  5. Choose Apply changes immediately.

  6. Choose Modify.

To adjust the preferred maintenance window, use the Amazon CLI modify-replication-instance command with the following parameters.

  • --replication-instance-identifier

  • --preferred-maintenance-window

Example

The following Amazon CLI example sets the maintenance window to Tuesdays from 4:00–4:30 a.m. UTC.

aws dms modify-replication-instance \ --replication-instance-identifier myrepinstance \ --preferred-maintenance-window Tue:04:00-Tue:04:30

To adjust the preferred maintenance window, use the Amazon DMS API ModifyReplicationInstance action with the following parameters.

  • ReplicationInstanceIdentifier = myrepinstance

  • PreferredMaintenanceWindow = Tue:04:00-Tue:04:30

Example

The following code example sets the maintenance window to Tuesdays from 4:00–4:30 a.m. UTC.

https://dms.us-west-2.amazonaws.com/ ?Action=ModifyReplicationInstance &DBInstanceIdentifier=myrepinstance &PreferredMaintenanceWindow=Tue:04:00-Tue:04:30 &SignatureMethod=HmacSHA256 &SignatureVersion=4 &Version=2014-09-01 &X-Amz-Algorithm=AWS4-HMAC-SHA256 &X-Amz-Credential=AKIADQKE4SARGYLE/20140425/us-east-1/dms/aws4_request &X-Amz-Date=20140425T192732Z &X-Amz-SignedHeaders=content-type;host;user-agent;x-amz-content-sha256;x-amz-date &X-Amz-Signature=1dc9dd716f4855e9bdf188c70f1cf9f6251b070b68b81103b59ec70c3e7854b3