简体   繁体   中英

Can we export Cloud Formation template from an existing VPC?

We have a VPC which contains all services and databases used for the testing. We are now planning to setup another such VPC, so that we can have an extra testing env.

Is there a way to export the CloudFormation template from the existing infrastructure ( VPC )?

Depends upon what all you want to clone/duplicate as well as to what level you would like to duplicate resources, you can look at following options;

  1. Use deprecated CloudFomer which is part of AWS CFN, you can built templates from your existing resources. Not recommended, just putting in list in case your use-cases are meet with this with less efforts, time and money.

  2. Use former2 a third party tool, which is more reliable than CloudFomer. Please refer this existing thread for more details.

  3. Use N2WS , a third party partnered solution with AWS. Please refer this Blog from AWS.

  4. Use CloudRanger , third party solution knows as Druva.

If the existing infrastructure were created using CloudFormation then you can just run the following command:

aws cloudformation get-template --stack-name myteststack

If not it's not possible because aws only uses cloudformation stacks visible for clients in products than you can change parameters after creation, like ECS.

You can export Cloud Formation template using Functionbeat which is Elastic Beat that we can deploy as a function in our serverless environment to collect data from cloud services. After configuring functionbeat use the following command to export the CloudFormation template.

For Linux and Mac ./functionbeat export function FUNCTION_NAME For Windows .\functionbeat.exe export function FUNCTION_NAME

Functionbeat will write the CloudFormation template to standard output or stdout which you can modify if needed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM