Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Copy configuration of one aws account to another

I would like to copy configuration (like VPC, P) of one Amazon account to another account. I need to export template of the first account and import it to other.

I would like to know what it the right way to do it? what are the things I need to take to my attention?

Can someone can direct me to good document/video that explain how export/import configuration to a template and what are the things I need to consider?

Thanks.

like image 979
user1980099 Avatar asked Sep 18 '25 14:09

user1980099


1 Answers

There is no easy way to copy resources from one AWS account to another.

The closest option is to create a CloudFormation template that matches your resources, and then use CloudFormation to deploy those resources in the other account.

There are various tools and services that can create CloudFormation templates from existing resources:

  • Using CloudFormer to Create AWS CloudFormation Templates from Existing AWS Resources
  • Hava, which can draw a picture of your resources and also provide a matching CloudFormation template
  • VisualOps, which allows you to draw your desired infrastructure and it will create the resources, but can also create a CloudFormation template of your existing resources
  • ...and probably other similar tools

You will need to consider things such as:

  • Create the VPC first, so resources can be created inside the VPC and Subnets
  • If your Amazon EC2 instances were created via CloudFormation or Auto Scaling, you'll want to create them in the other account in the same way, rather than manually creating the instances
  • Amazon Machine Images (AMIs) can be shared between accounts, which is easier than creating new ones
  • You'll need to also replicate IAM Roles that are used by other services

Bottom line: You'll need a good understanding of your existing configuration to be able to reproduce it elsewhere, to make sure it works in the same manner. Hopefully, you've documented what you've created along the way.

like image 179
John Rotenstein Avatar answered Sep 21 '25 06:09

John Rotenstein