How to Create CloudFormation Stack on AWS

AWS CloudFormation provides users with a simple way to create and manage a collection of Amazon Web Services (AWS) resources by provisioning and updating them in a predictable way. AWS CloudFormation enables you to manage your complete infrastructure or AWS resources in a text file.

 

  • Login to aws portal.
  • Click on Services.

 

Fig 1

 

  • Under Management & Governance select CloudFormation.

 

Fig 2

 

  • Click on Create Stack.

 

Fig. 3

 

  • When we select template source.
  • We can Upload template file from local or Amazon S3 file.

 

Fig. 4

 

  • When we select create template in designer.
  • Click on Create template in designer.

 

Fig. 5

 

  • Write the code in json or yaml format.

 

Fig. 6

 

  • After the code is ready then click on upload.

Fig. 7

 

  • Template will be stored on Amazon S3.
  • Click on Next.

 

Fig. 7

 

  • Provide the stack name.
  • Provide all parameters.
  • Click on Next.

 

Fig. 8

 

  • Provide key name & value for resources in stack.

 

Fig 9

 

  • Leave the advance options.
  • Click on Next.

 

Fig 10

 

  • Review all the configuration.

 

Fig 11

 

  • Click on Create stack.

 

Fig 12

 

  • After sometime Stack is ready.

 

Fig 13

 

 

Create CloudFormation Stack using Shell

aws cloudformation create-stack –stack-name myteststack –template-body path of json folder –parameters ParameterKey=KeyPairName,ParameterValue=TestKey ParameterKey=SubnetIDs,ParameterValue=SubnetID1

 

Leave a Reply