How to Migrate an AWS RDS Aurora Cluster to New…
How to Migrate an AWS RDS Aurora Cluster to New Subnets Without Downtime
Fix the InvalidParameterCombination error and move your RDS subnet group safely
When attempting to move an RDS cluster to new subnets, many AWS engineers hit an unexpected wall. Whether you're responding to a security compliance requirement, re-architecting your VPC, or scaling across availability zones, subnet migration is one of the trickier RDS operations AWS supports.
This guide walks through the exact sequence of steps to migrate an Aurora PostgreSQL (or Aurora MySQL) RDS cluster to new subnets — including the correct order of failovers, instance deletions, and re-creations to keep your service running throughout.
Why This Error Occurs
RDS clusters in high-availability (HA) configurations span multiple availability zones (AZs). AWS prevents you from changing the subnet group of individual DB instances within a cluster because doing so mid-operation could break HA topology and cause data inconsistencies.
You’ll typically encounter one of two errors:
Error 1: Modifying the DB instance subnet group
An error occurred (InvalidParameterCombination) when calling theModifyDBInstance operation: You can’t modify the subnet group of theDB instance because it is a member of a cluster.
Error 2: Modifying the subnet group directly
An error occurred (InvalidParameterValue) when calling theModifyDBSubnetGroup operation: Some of the subnets to be deleted arecurrently in use: subnet-0ab5bf2e9a8286f41, subnet-0c5c6308089b38c2a
The second error occurs because live RDS instances are still running in those old subnets, blocking their removal. The solution is a carefully ordered sequence of failovers and instance replacements.
Prerequisites & Key Concepts
Before starting, ensure your new subnet group has subnets in at least two different Availability Zones. AWS requires Multi-AZ coverage and will block the operation if this condition isn’t met.
AWS CLI installed and configured with appropriate IAM permissions
Your new target subnet IDs ready (e.g. from your updated VPC configuration)
Your DB subnet group name, cluster identifier, and instance identifiers
The
rds:RebootDBInstance,rds:DeleteDBInstance, andrds:CreateDBInstanceIAM permissionsA maintenance window or low-traffic period (individual instances will cycle)
Step-by-Step Migration Guide
The strategy is to roll through each instance: failover → delete → modify subnet group → re-create. Repeat until all instances live in the new subnets.
Step 1: Force a Failover for the Writer Instance Force a failover so the writer role moves to a reader in a different AZ. This frees the current writer instance for deletion.
Wait for the failover to complete before proceeding. Monitor status in the AWS Console under RDS > Clusters, or poll with: aws rds describe-db-clusters --db-cluster-identifier rds-cluster
Step 2: Delete the Old Writer Instance After the failover, the original writer is now a reader in the old subnet. Delete it to free up that subnet.
Step 3: Modify the DB Subnet Group With one instance removed, you can now update the subnet group to include the new subnets. Replace the old subnet IDs with your new ones.
Step 4: Re-Create the Deleted Instance Re-create the instance. Because the old subnet has been removed from the group, it will now launch in the new subnet automatically.
Step 5: Failover to the New Instance Once the new instance is available, perform another failover to make it the writer.
Step 6:Delete the Remaining Old Instance Delete the instance still running in the old subnet (the one that was the original writer after Step 1).
Step 7: Finalize the Subnet Group With all instances removed from old subnets, update the subnet group one final time to cleanly remove any remaining old subnet references.
Step 8: Re-Create the Final Instance Re-create the last instance. It will be placed in the new subnet, completing the migration.
Limitations & Important Considerations
Multi-AZ Requirements Your subnet group must always contain subnets in at least two different AZs. AWS enforces this at every modify-db-subnet-group call. Plan your new subnets accordingly before starting.
Instance-Level Downtime While the cluster itself remains available throughout this process (Aurora routes traffic to the active writer), individual instances cycle through delete/re-create phases. Applications using instance-level endpoints (rather than the cluster endpoint) may experience brief disconnections.
Best practice: Always connect your application to the cluster endpoint (e.g. cluster.cluster-xxxx.us-west-2.rds.amazonaws.com), not a specific instance endpoint. This ensures seamless failover handling.
Failover Timing Failovers typically complete within 30–60 seconds for Aurora, but can take longer under load. Always confirm the failover is complete before deleting the demoted instance. Deleting an instance while it’s still the writer can cause a longer outage.
Parameter Group & Security Group Compatibility Ensure that your DB parameter groups and security groups are compatible with the new subnets and VPC. If the new subnets are in a different VPC, additional networking changes will be required.
Quick Reference: Command Summary
Conclusion
Migrating an AWS RDS Aurora cluster to new subnets requires patience and a specific sequence of operations, but it’s entirely doable without taking your service offline. The core approach — failover, delete, modify, re-create — works because it ensures no two instances occupy an old subnet at the same time as you try to remove it.
Key takeaways:
Always connect applications to the cluster endpoint, not instance endpoints
Wait for each failover to complete before proceeding
Ensure new subnets span at least two AZs before starting
Plan the migration during low-traffic periods to minimize risk