Suvendu helps you
change the VPC
for your RDS DB instance


How can I move my Amazon Relational Database Service (Amazon RDS) DB instance from an existing virtual private cloud (VPC) to a new VPC?

Before you move the RDS DB instance to a new network, configure the new VPC, including the security group inbound rules, the subnet group, and the route tables. When you change the VPC for a DB instance, the instance reboots when the instance moves from one network to another. Because the DB instance isn't accessible while the instance is being moved, change the VPC during a scheduled maintenance window.

You can't change the VPC for a DB instance if:

  • The DB instance is in multiple Availability Zones. Convert the DB instance to a single Availability Zone, and then convert it back to a Multi-AZ DB instance after moving to the new VPC. For more information about converting instances, see High Availability (Multi-AZ).
    You can't change a DB subnet group to a Multi-AZ configuration. By default, the Amazon Aurora storage is Multi-AZ—even for a single instance—so you can't change the VPC for Amazon Aurora. To change the VPC for an Amazon Aurora instance, create a DB snapshot, and then restore the instance from a DB snapshot in the new VPC.
  • The DB instance is a read replica or has read replicas. Remove the read replicas, and then add read replicas after the DB instance is moved to the new VPC.
  1. Open the Amazon RDS console, and then choose Subnet Groups from the left navigation pane.
  2. Choose Create DB Subnet Group.
  3. Enter the subnet name, description, and VPC ID, and then choose the subnets needed for the DB instance.
  4. Choose Create.
  5. Choose Instances from the left navigation pane.
  6. Select the DB instance, choose Instance Actions, and then choose Modify.
  7. Under Network & Security, select the Subnet Group associated with the new VPC, and then choose the appropriate Security Group for that VPC.
  8. Choose Apply Immediately, and then choose Continue.
    Note: If you don't choose Apply Immediately, the VPC is modified during the next maintenance window.
  9. Review the details on the Modify DB Instance page, and then choose Modify DB Instance.

This task can take several minutes to complete. You can confirm that the subnet is changed by selecting the instance and then navigating to the configuration details page, which shows that the subnet group is updated and the status is Complete. You can also open the RDS console and then choose Events in the left navigation pane to confirm that the process moved the DB instance to the target VPC.

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2016-05-26

Updated: 2018-08-02