{"id":1231,"date":"2019-08-27T18:32:00","date_gmt":"2019-08-27T13:02:00","guid":{"rendered":"http:\/\/blogs.opstree.com\/?p=1231"},"modified":"2019-08-29T18:51:42","modified_gmt":"2019-08-29T13:21:42","slug":"aws-rds-cross-account-snapshot-restoration","status":"publish","type":"post","link":"https:\/\/opstree.com\/blog\/2019\/08\/27\/aws-rds-cross-account-snapshot-restoration\/","title":{"rendered":"AWS RDS cross account snapshot restoration"},"content":{"rendered":"\n<figure class=\"wp-block-image\"><a href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/65b3a-jan-antonin-kolar-lrox0shwjuq-unsplash.jpg\"><img decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/65b3a-jan-antonin-kolar-lrox0shwjuq-unsplash.jpg?w=300\" alt=\"\" \/><\/a><\/figure>\n\n\n\n<p>Many a times you may have faced problem where your production&nbsp;infra is on different&nbsp;AWS account and non prod on different&nbsp;account and you are required to restore the RDS snapshot to non prod account for testing. <\/p>\n\n\n\n<p> Recently I got a task to restore my prod account RDS snapshot to a different account for testing purpose. It was a very interesting and new task for me. and I was in an awe, how AWS thinks about what all challenges we may face in real life and provides a solution to it.<br><br>For those who are not aware about RDS, I can brief RDS as a relational database service by Amazon Web Services (AWS), it is a managed service so we don\u2019t have to worry about the underlying Operating System and Database software installation, we just have to use it.<br><br>Amazon RDS creates a storage volume snapshot of your DB instance backing up the entire DB instance and not just individual database. As I told you, we have to copy and restore an RDS snapshot to a different aws account. There is a catch!, you can directly copy an aws snapshot to a different region in same aws account, but to copy to a different aws account you need to share the snapshot to aws account and then restore from there, so lets begin.<br><br>To share an automated DB snapshot, create a manual DB snapshot by copying the automated snapshot, and then share that copy.<br><br><strong>Step 1:<\/strong>&nbsp;Find the snapshot that you want to copy, and select it by clicking the checkbox next to it\u2019s name. You can select a \u201cManual\u201d snapshot, or one of the \u201cAutomatic\u201d snapshots that are prefixed by \u201crds:\u201d.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/fc09e-1.png\"><img decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/fc09e-1.png?w=300\" alt=\"\" \/><\/a><\/figure>\n\n\n\n<p><strong>Step 2:<\/strong>&nbsp;From the \u201cSnapshot Actions\u201d menu, select \u201cCopy Snapshot\u201d.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/6654f-2.png\"><img decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/6654f-2.png?w=300\" alt=\"\" \/><\/a><\/figure>\n\n\n\n<p><strong>Step 3:<\/strong>&nbsp;On the page that appears:&nbsp;Select the target region. In this case, since we have to share this snapshot with another aws account we can select existing region.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/aec5e-3.png\"><img decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/aec5e-3.png?w=300\" alt=\"\" \/><\/a><\/figure>\n\n\n\n<ul><li>Specify your new snapshot name in the \u201cNew DB Snapshot Identifier\u201d field. This identifier must not already be used by a snapshot in the target region.<\/li><li>Check the &#8220;Copy Tags&#8221; checkbox if you want the tags on the source snapshot to be copied to the new snapshot.<\/li><li>Under &#8220;Encryption&#8221;, leave &#8220;Disable Encryption&#8221; selected.<\/li><li>Click the &#8220;Copy Snapshot&#8221; button.<\/li><\/ul>\n\n\n\n<p><strong>Step 4:<\/strong>&nbsp;Once you click on &#8220;Copy Snapshot&#8221;, you can see the snapshot being created.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/85aad-4.png\"><img decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/85aad-4.png?w=300\" alt=\"\" \/><\/a><\/figure>\n\n\n\n<p><strong>Step 5:<\/strong>&nbsp;Once the manual snapshot is created, select the created snapshot, and from the \u201cSnapshot Actions\u201d menu, select \u201cShare Snapshot\u201d.<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/69828-6.png\"><img decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/69828-6.png?w=300\" alt=\"\" \/><\/a><\/figure>\n\n\n\n<p><strong>Step 6:<\/strong>&nbsp;Define the &#8220;DB snapshot visibility&#8221; as private and add the &#8220;AWS account ID&#8221; to which we want to share the snapshot and click on save.<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/c7ce9-7.png\"><img decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/c7ce9-7.png?w=300\" alt=\"\" \/><\/a><\/figure>\n\n\n\n<p>Till this point we have shared our db snapshot to the aws account where we need to restore the db.<br>Now login to the other aws account and go to RDS console and check for snapshot that was shared just recently.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/2b277-8.png\"><img decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/2b277-8.png?w=300\" alt=\"\" \/><\/a><\/figure>\n\n\n\n<p><strong>Step 7:<\/strong>&nbsp;Select the snapshot&nbsp;and&nbsp;from the \u201cSnapshot Actions\u201d menu&nbsp;select \u201cRestore Snapshot\u201d.<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/5936c-9.png\"><img decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/5936c-9.png?w=300\" alt=\"\" \/><\/a><\/figure>\n\n\n\n<p><strong>Step 8:<\/strong>&nbsp;From here we just need to restore the db as we do&nbsp;normally.&nbsp;Fill out the required details like &#8220;DB Instance class&#8221;, &#8220;Multi-AZ-Deployment&#8221;, &#8220;Storage Type&#8221;, &#8220;VPC ID&#8221;, &#8220;Subnet group&#8221;, &#8220;Availability Zone&#8221;, &#8220;Database Port&#8221;, &#8220;DB parameter group&#8221;, as per the need and requirement.<br><\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/237d2-10.png\"><img decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/237d2-10.png?w=300\" alt=\"\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/b745c-11.png\"><img decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/b745c-11.png?w=300\" alt=\"\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/2e2d2-12.png\"><img decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/2e2d2-12.png?w=300\" alt=\"\" \/><\/a><\/figure>\n\n\n\n<p><strong>Step 9:<\/strong>&nbsp;Finally click on &#8220;Restore DB instance&#8221; and voila !!, you are done.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/f726b-13.png\"><img decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/f726b-13.png?w=300\" alt=\"\" \/><\/a><\/figure>\n\n\n\n<p><strong>Step 10:<\/strong>&nbsp;You can see the db creation in process. Finally, you have restored the DB to a different&nbsp;AWS account !!<\/p>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/9edf6-14.png\"><img decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/9edf6-14.png?w=300\" alt=\"\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/41bf7-15.png\"><img decoding=\"async\" src=\"https:\/\/opstree.com\/blog\/\/wp-content\/uploads\/2019\/08\/41bf7-15.png?w=300\" alt=\"\" \/><\/a><\/figure>\n\n\n\n<p><strong>Conclusion:<\/strong><\/p>\n\n\n\n<p>So there you go. Everything you need to know to restore a production AWS RDS into a different&nbsp;AWS account.&nbsp;That&#8217;s cool !! Isn&#8217;t it ?, but I haven&#8217;t covered everything. There is a lot more to explore. We will walk through RDS best practices in our next blog, till then keep exploring our other tech blogs !!.<br><br><strong>Image source:<\/strong>&nbsp;https:\/\/unsplash.com\/photos\/lRoX0shwjUQ <\/p>\n\n\n\n<p><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many a times you may have faced problem where your production&nbsp;infra is on different&nbsp;AWS account and non prod on different&nbsp;account and you are required to restore the RDS snapshot to non prod account for testing. Recently I got a task to restore my prod account RDS snapshot to a different account for testing purpose. It &hellip; <a href=\"https:\/\/opstree.com\/blog\/2019\/08\/27\/aws-rds-cross-account-snapshot-restoration\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;AWS RDS cross account snapshot restoration&#8221;<\/span><\/a><\/p>\n","protected":false},"author":168525379,"featured_media":29900,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false},"version":2}},"categories":[144203,28070474],"tags":[768739294,130364071,8155],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/opstree.com\/blog\/wp-content\/uploads\/2025\/11\/DevSecOps-1.jpg","jetpack_likes_enabled":true,"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pfDBOm-jR","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/1231"}],"collection":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/users\/168525379"}],"replies":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/comments?post=1231"}],"version-history":[{"count":16,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/1231\/revisions"}],"predecessor-version":[{"id":1262,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/posts\/1231\/revisions\/1262"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media\/29900"}],"wp:attachment":[{"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/media?parent=1231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/categories?post=1231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/opstree.com\/blog\/wp-json\/wp\/v2\/tags?post=1231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}