简体   繁体   中英

How to convert AWS resources to a cloudformation stack or template?

I have a bunch of AWS resources (ec2 instances, rds, s3, etc.)

Those resources were created manually over the years in AWS console.

Now I would like to duplicate this environment using CloudFormation. What is the best approach? Is there a tool, that converts all the resources into a cloudformation stack or template?

I couldn't find anything, or maybe I didn't understand the process correctly...

There was a service named CloudFormer that could perform this action but has since become deprecated.

Functionality does exist within CloudFormation to create a stack from existing resources .

However, to use this you will want to design the stack to use the same options and setup as your resources. Once this is completed you could then manage these resources via CloudFormation.

More information is available in the Import Existing Resources into a CloudFormation Stack blog post.

You could potentially try the AWS Console Recorder extension for Chrome/Firefox which supposedly could create CloudFormation templates based on your AWS Console clicks.

From their README:

Records actions made in the AWS Management Console and outputs the equivalent CLI/SDK commands and CloudFormation/Terraform templates.

Caveat: Not all resources are supported .

These days you would use a third party, free and fully open-source tool called former2 developed by renovated AWS Hero . The former2 is used by corporate clients of AWS as explained in the AWS blog post .

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