How can I change the VPC of an Amazon Aurora for MySQL or PostgreSQL cluster?

Last updated: 2020-05-29

How can I change the Amazon Virtual Private Cloud (Amazon VPC) that is associated with an Amazon Aurora cluster?  

Short Description

You can't modify the VPC of an Aurora cluster or instance. However, you can change the VPC of an Aurora cluster by using one of the following methods:

  • Create a clone in a different VPC.
  • Take a snapshot and then restore the snapshot in a different VPC.
  • Set up replication using binary logging (MySQL only).

Resolution

Create a clone in a different VPC

If you clone a database in an Aurora cluster, then you can change the VPC of the clone. However, the subnets in the VPC must map to the same set of Availability Zones. For more information, see Cloning Databases in an Aurora DB Cluster.

Take a snapshot and then restore the snapshot in a different VPC

If you create a snapshot of an Aurora instance or cluster, then you can restore the snapshot to the new VPC. For more information, see Restoring from a DB Cluster Snapshot.

Set up replication using binary logging using MySQL

If you use Amazon Aurora for MySQL and you set up replication using binary logging, then you can change the VPC of an Aurora cluster with minimal downtime.

  1. Create a new Aurora cluster in the target VPC.
  2. Set up manual MySQL replication between the two Aurora clusters.
  3. Promote the replica to be a standalone cluster.