AWS can not change DB Subnet Group for AWS RDS

Solution 1:

I had this same question a few months back, and ended up contacting AWS (I have Enterprise support). This was the result:

Unfortunately, moving DB instance subnet group to another subnet group in the same VPC is not supported at this time. I realize our documentation says that it is supported, but that is an error. We are currently working on updating our documentation to reflect this and I apologize for the mis-communication.

However, I do have a workaround, you can create a new temporary VPC, update the subnet group to point to that temporary VPC, then once that process completes, change the subnet group to point back to your new subnet group.

Alternatively, another way to do it would be to create a database snapshot, and spin up a new instance from the snapshot.

You might want to look at both approaches. Both methods will probably cause you some downtime unless you are able to run your application in read only mode for a while, or have a method of replaying transactions on the restored snapshot.

Solution 2:

The following steps can be performed to change the subnet group within VPC,

  1. Convert the prod DB instance to a Single Availability Zone (if multi-AZ enabled)

  2. Modify the subnet group by choosing any default/other VPC subnet groups and continue with Apply immediately

  3. After, again modify the subnet group by choosing the new one that you want to

  4. Also, choose relevant Security Groups and continue with Apply immediately

  5. Check connectivity from servers

  6. Then convert it back to a Multi-AZ

Note: Time to perform the above steps takes around 40 mins to 50 mins


Solution 3:

What I did -> create a snapshot, restore snapshot and select your new subnet group that have only public or your desired subnets and ...voilá

the subnet group option for aurora can just set on instance build and you cannot change it after.


Solution 4:

Seems that 2 and half years in and this problem still persists. The biggest problem is that I am updating my infrastructure through Cloudformation and from documentation the correct modifying strategy when changing DB subnet name is a resource replacement, which does not seem to be the case once I look at my stack changeset where DB subnet resource for replacement has flag "False" and afterward the stack update fails with DB subnet group having "Internal Error".

Now I essentially have to manually modify resources to have them update correctly even though that completely goes against usage of CloudFormation