Cloudformation if we define is a automation product available in AWS as a service. It is an IAC (Infrastructure as code) using cloud formation we can create infrastructure using YAML or JSON file and we can use this template to create,update delete our infrastructure

Benefits of implementing Cloudformation

  • We can test our infrastructure first on test environment and then can move it to Production.
  • The Cloudformation template can be reused.
  • Across the business these template can be used as library and can be used across teams.
  • Template can be used for temporary periods so team can use it to create , update and delete if required for temporary or short period.


It is a JSON or YAML format file which defines logic resources which needs to be created , updated or deleted when integrated with the stack.


Under the file Resources is mandatory tag.

Description :- gives free text description for templates

Parameter :- can ask for input from user like what amount CPU is requres for a blcok.

Output :- What output user should receive like if it’s a wordpress tempalte user should get URL of wordpress site after running the template.

Resources :-


Stack is a container which contains logical resources which are defined under the template files and uploaded over STACK.Stack create,update or deletes physical resources for each o the logical resources defined under the template file.


Open your AWS Cloud console and navigate to cloudFormation service


On next window click on a create stack (With new resources)


Next windows we will get multiple option of choosing the template like upload a existing template , use a sample template , create template in designer under this example we are upload an existing template so we will choose the option Template is ready and then under specify template window we will choose the option upload the template file.


At the third step you can choose the option of uploading the template template can be saved on local drive or on github or over S3.

For this example template can be found at – You don’t have permissions to view Try another account

Once template has been uploaded it will come something like below :-


After this click on NEXT under this screen we require to provide a STACK NAME after providing the stack name click on Next again.


Under the next screen you can choose option for IAM role for permissions on how cloudFormation can create , modify , delete resources in the stack if not required you can keep as it is once done with configuration on this screen click on Next it will take us to the Review stack window if anything needs to be updated we can lick on respective Edit button otherwise we can just hit the create stack button.


Once we click on create stack button it will take us to actual window where we can see stack creation progress.
We can see the progress of stack creation by click on the refresh option provided under the Events tab. Once the stack is created we can see the status as completed.


Next if we go to the Resources tab we can see the Physical resources for example here (S3 Bucket) has been created as per the logical resources provided under the template file.
Resource can by anything defined under template file :- (VPC , EC2 INSTANCE , S3)


So we have seen how to create a template , upload a template over stack and then how that stack uses the template to create Physical resource.

Leave a Reply