Reputation: 103
I have doubt on how RDS behaves regarding removing subnets from subnet groups.
In my subnet group configuration, I realized I have configured an unwanted subnet. It's unwanted because it doesn't (and shouldn't) have the routing as the rest of the subnets that form the subnet group, for a specific RDS instance.
I want to remove this subnet from the subnet group, and can do so directly by going to RDS > Subnet Groups > Edit
My doubt is on failover behavior if the instance is sitting in this unwanted subnet. What does RDS do in this case? I don't have Multi-AZ enabled for this instance. Want to keep downtime to a minimum, or zero of possible.
Appreciate the help.
Upvotes: 1
Views: 7189
Reputation: 1731
For anyone else reading this, I'm trying something similar with an aurora PSQL cluster and getting
Some of the subnets to be deleted are currently in use: subnet-xxxx (Service: AmazonRDS; Status Code: 400; Error Code: InvalidParameterValue; Request ID: 1111111-1111-1111-1111-11111; Proxy: null)
AWS documentation[1] hints this is not possible, because the subnet/az has already been used to store data.
[1] https://aws.amazon.com/premiumsupport/knowledge-center/change-vpc-rds-db-instance/
Update: aws support confirmed this and it's also mentioned in [2]. This applies even if there's currently no instance in the subnet I'm trying to remove.
Upvotes: 1
Reputation: 269951
You can view the AZ in which the instance is running by looking in the Amazon RDS console. The Security and Network section shows the current Availability Zone.
You can edit the Subnet Group to remove AZs. (It even lets you remove the AZ in which the database is currently running, but that won't affect the database.)
If you are uncomfortable with making changes, you can always spin-up a test environment with the same settings and play around with the changes.
Bottom line: You can view which AZ is being used. Feel free to remove the AZ from the Subnet Group.
Upvotes: 2