Each high-availability instance consists of a master instance and a slave instance. The master and slave instances are located in different zones within the same region.

The data in the master instance is synchronized to the slave instance in real time. You can only access the master instance. The slave instance exists only as a backup. However, when the rack (where the master instance is located) encounters an error, the master and slave instances can be switched. After the switch, the original master instance becomes a backup instance, and rack-level disaster tolerance can be realized.

This document describes how to switch between master and slave instances.


  • Currently this operation is not applicable to the Basic Edition of MySQL 5.7 and SQL Server 2012/2016 instances. This is because Basic Edition instances do not have slave nodes.
  • Switching between master and slave instances may result in transient disconnection. Make sure that your application has a reconnection configuration.


  1. Log on to the  RDS console.
  2. Select the region where the target instance is located, and click the ID of a target instance.
  3. In the left-side navigation pane, select Instance Availability.
  4. In the Availability Information area, click Switch Master/Slave Instance.
  5. Select Switch now or Switch within maintenance period.
    During the switch, many operations cannot be performed. Therefore, we recommend that you choose to switch within the maintenance period.

  6. Do as follows to change the maintenance period is necessary:
    1. Click Modify to open the Basic Information page.

    2. In the Configuration Information area at the lower left corner, select a maintenance period and click Save.

    3. Go back to the page for switching between master and slave instances and refresh the page.
  7. Click OK.