RDS Snapshots restore to the default VPC, even if the snapshot lives elsewhere
See original GitHub issueDescribe the bug
I have an RDS Aurora cluster in a private VPC (let’s call this VPC B). The default VPC for this region is VPC A. When I create a snapshot via rds.create_db_cluster_snapshot()
, I can describe this snapshot and see that the snapshot is in VPC B. However, when I restore this snapshot with rds.restore_db_cluster_from_snapshot()
, it automatically deploys to VPC A. There is not currently a way to specify VPC in Boto3 for this function, the closest is the ability to specify VpcSecurityGroupIds
- if I do so, I get an error that those security group IDs are in a different VPC than my intended database.
Steps to reproduce Create two VPCs, one default (A), one not-default (B). Create an RDS aurora cluster in B. Create a snapshot of the cluster in B. Restore snapshot to new DB. It will deploy to A.
Expected behavior Either Boto3 gives the user a way to specify VPC in RDS restore_ functions, or restore goes to the VPC the snapshot is associated with rather than the default VPC.
Debug logs
Full stack trace by adding boto3.set_stream_logger('')
to your code.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
That is the solution, thanks! So odd - the
DBSubnetGroupName
is not something I’d ever think to access compared to the name/id of the VPC.You’re welcome @hardingalexh, glad it’s working!