amazon-web-servicesamazon-rdssubnet

RDS subnet group change error "Can't be on same VPC as RDS"


I can't find documentation on this error, and when I do it doesn't really fix my issue.

We're sorry, your request to modify DB instance has failed. You cannot move DB instance to subnet group <NEW GROUP. 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.

I have 1 VPC and two subnet groups 1 of subnet A, B, and C which are identical defaults in different zones. subnet group 2 is D, E, and F which are identical in different zones.

Why am I getting an error about needing different VPC when the current subnet group is in the same VPC already?

Background: I recently changed default subnet settings to point A, B, and C to a NAT gateway and created D, E, and F which point to an IGW. I did this so my lambda on the same VPC can access the internet, now I can't connect to my DB any longer...

https://serverfault.com/questions/816820/aws-can-not-change-db-subnet-group-for-aws-rds doesn't explain this error, it only states you can't switch subnet groups, but this error suggests I can.


Solution

  • The documentation (here and here) explains that you can only change subnet group when moving your DB to a different VPC:

    The subnet group for the DB instance. You can use this setting to move your DB instance to a different VPC.

    In the Network & Security section of the modify page, shown following, enter the new subnet group for Subnet group. The new subnet group must be a subnet group in a new VPC.

    This explain why you are getting the error - changing subnet group withing same VPC is not supported.

    The link you've provided explains workarounds, e.g. using snapshots or a temporary VPC.