question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

RDS Snapshots restore to the default VPC, even if the snapshot lives elsewhere

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
hardingalexhcommented, Feb 28, 2022

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.

0reactions
kdailycommented, Feb 28, 2022

You’re welcome @hardingalexh, glad it’s working!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Restoring from a DB snapshot - AWS Documentation
Restore an Amazon RDS DB instance from a DB snapshot. ... When you restore a DB instance, the default virtual private cloud (VPC),...
Read more >
download RDS snapshot - mysql - Stack Overflow
The only way to solve your issue is to take a snapshot and cerate a new DB instance out of it within the...
Read more >
AWS RDS DB Snapshot, Backup & Restore
DB snapshots enable backing up of the DB instance in a known state as needed, and can then be restored to that specific...
Read more >
N2WS Backup & Recovery (CPM) User Guide V3.1.0b
It allows managing snapshots of EBS volumes, RDS instances and clusters, ... The proxy settings will be kept as the default for the...
Read more >
Unable to restore RDS from a Snapshot shared from other ...
You need to copy the snapshot into account 2, then you may restore from that copied snapshot. As you have seen, you can't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found