AWS can not change DB Subnet Group for AWS RDS

amazon-web-servicesrds

we have to (want to..) rename our DB Subnet Groups on AWS, so i created a new DB Subnet Group with same settings as the old one. When i want to switch the Group on "Modify Tab" in AWS GUI and hit apply, aws returns:

You cannot move DB instance XXX to subnet group XXX. The specified DB
subnet group and DB instance are in the same VPC. Choose a DB subnet
group in different VPC than the specified DB instance and try again.
(Service: AmazonRDS; Status Code: 400; Error Code:
InvalidVPCNetworkStateFault; Request ID:
7d46c84c-b22a-11e6-be20-b5bb6bd6cc6d)

Any suggestions? Or is it just not possible without recreating whole instance?

Best Answer

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.

Related Topic