Can we export Cloud Formation template from an existing VPC?

和自甴很熟 提交于 2021-02-11 18:24:39

问题


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 )?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/65736413/can-we-export-cloud-formation-template-from-an-existing-vpc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!