AWS CloudFormer | Generate AWS CloudFormation Template with Existing Resources

Ridma Gamage
4 min readOct 3, 2018

--

What is AWS CloudFormation?

AWS CloudFormation is a service that helps you model and set up your Amazon Web Services resources so that you can spend less time managing those resources and more time focusing on your applications that run in AWS. You create a template that describes all the AWS resources that you want (like Amazon EC2 instances or Amazon RDS DB instances), and AWS CloudFormation takes care of provisioning and configuring those resources for you. You don’t need to individually create and configure AWS resources and figure out what’s dependent on what; AWS CloudFormation handles all of that.

What is AWS CloudFormer ?

AWS CloudFormer is a template creation tool and it creates AWS CloudFormation template from our existing resources in AWS account. We can select any supported AWS resources that are running in our account, and CloudFormer creates a template in an Amazon S3 bucket. We will be using AWS CloudFormer to create template of existing infrastructure.

Here we use Following scenario to explain how to generate CloudFormer Template using existing AWS resources.

We already have AWS resources set up as mention in the following diagram.

Sample Design Architecture

Our requirement here is the create CloudFormer template for the above resources. Then we can create these architecture again in same AWS account or another AWS account instead of create resources from the scratch.

01. Go to AWS management console which is these resources reside.

02. Go to CloudFormation service in AWS management console and click on Launch CloudFormer.

03. Choose select a sample template and select CloudFormer from the drop down. Go Next

04. Give a Name, User name and Password and select CreateNewVPC from VPC Selection drop down list.

05. Keep remaining values as default in the wizard and complete with review.

Now You can see new EC2 instance is creating under EC2 service dashboard. Your CloudFormer template will be implement inside the EC2 instance. Once EC2 creation is completed, You can access the template using public DNS of EC2.

06. Select the cloudFormer EC2 instance and copy the public DNS. paste into your browser with https://<publicDNS>. You will redirect to this page. Then select your AWS region from the drop down and click on Create Template.

07. In the next window called Template Information, You have to enter Template info like Template description. Enter those details and click continue.

08. Select DNS Name if you have them in your VPC in the next window.

09. Select the VPC which you need to include into CloudFormation Template. Here on wards you will see only resources belong to the selected VPCs.

10. Select Subnets and Internet Gateway you need to add to the cloud formation template.

11. Select Access Control Lists(ACL) and Route tables you need to include CloudFormation template.

12. Select Elastic IPs and other managed services you need to add into the CloudFormation template

13. Select EC2 instances you need to add to the CloudFormation template.

14. Select Storage related services and application services from the next steps.

15. Select the Security Groups and Operational Resources you need to insert into CloudFormation template from next two windows.

16. Now you are selected all the resources you need to include with CloudFormer template. Provide a Name for CloudFormer Template. Create S3 bucket inside S3 service and select it from the drop down list. Your CloudFormer template will save in this S3 bucket.Save CloudFormer Template.

You can access CloudFormer template from the S3 location when you need to deploy it. Also you can change the details in the template according to your requirement.

Delete your CloudFormer template once you saved your Template. It will deleted all the resources created for Template including EC2 instance.

If you are wish to fix any thing related to aws please contact through fiverr- https://www.fiverr.com/s2/2587ecc953?utm_source=CopyLink_Mobile

References : https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/Welcome.html

--

--