Home Miscellaneous What is CloudFormation and its concept

What is CloudFormation and its concept

by SupportPRO Admin

Aws CloudFormation is a service that AWS provides which is similar to AWS on version of infrastructure as code (IaC) . CloudFormation helps us to create or manage a complete infrastructure in a template that can be then deployed as a stack on AWS. With the help of CloudFormation, we can deploy all the applications to various environments by creating a template. The Advantage of using the template is that we can reuse it to create multiple stacks and use it to deploy various resources.

CloudFormation will help to create a Stack for our Template and will automatically construct and form all the resources as we mentioned on our templates. These templates are created in a JSON or YAML format in CloudFormation. We can either save the template locally in our system or can be saved in S3 Bucket.

The Advantage of using AWS CloudFormation:

  • The automation process is improved
    The Template creation allows us to declare all the resources we need thus we can avoid depending on other automation tools.
  • Easy update
    Using CloudFormation we can easily make updates and changes to our environment much faster. Also, help us to review the changes before it gets implemented.
  • Track the changes in infrastructure
    When the infrastructure is provisioned using CloudFormation, it will help us to understand exactly what resources are deployed and the setting that is used on it. These templates are text files, it helps us to track down the differences in your template. We can implement version control for the Templates that help us to track the changes.
  • Infrastructure provisioning and replication
    Help us to recreate our infrastructure much faster without affecting the current infrastructure or resource we have created on the template. We can create multiple stacks using a single template.
  • Avoid the use of multiple infrastructure tools.
    With CloudFormation we can deploy all our infrastructure much easier without depending on any other tools.
  • Simplicity
    It is much easier to understand as the template is created in yaml or json.

The fundamental concept of CloudFormation and how it works:

  • Templates
  • Stacks
  • Change sets

Template

The template is a method we use to define our requirements it will be either in Json or Yaml format file. The template can be used with any of the following extension “.json, .yaml, .txt, .template”. This template is used to Build infrastructure and resource on the aws. In Template we can define all the parameters that we needed to create a resource for example instance type, AMI ID, Key file etc

Example json code:

{

“AWSTemplateFormatVersion” : “2010-08-08”,

“Description” : “A test template”,

“Resources” : {

“MyEC2Instance” : {

“Type” : “AWS::EC2::Instance”,

“Properties” : {

“ImageId” : “ami-0233c2d874b811deb”,

“InstanceType” : “t3.micro”,

“KeyName” : “keyname”,

“BlockDeviceMappings” : [

{

“DeviceName” : “/dev/sdf”,

“Ebs” : {

“VolumeType” : “io1”,

“Iops” : 250,

“DeleteOnTermination” : true,

“VolumeSize” : 25

}

}

]

}

}

}

}

 

Stack:

In CloudFormation multiple resources are managed as a Stack. We can make any changes to our resources by defining the changes on the stacks which we have created.

We can use a single template to create numerous numbers of stack, the naming should be non-identical.

Change Set

Whenever an update needs to be done on the Stack, we can simply run an update on the stack. It also helps us to review or share a summary of changes that going to happen on the resource.

With the help of CloudFormation now deploying big and, multiple infrastructures is easy. No longer do we need to depend on any other automation deployment tools. All the requirements can be customized using CloudFormation. Using CloudFormation, we can easily do upgrades and changes to the existing resource. A detailed description regarding each change and action that gone to take place on each update can be reviewed in advance using CloudFormation. The CloudFormation deployment can be managed using AWS CLI, Console or API.

 

Leave a Comment

CONTACT US

Sales and Support

Phone: 1-(847) 607-6123
Fax: 1-(847)-620-0626
Sales: sales@supportpro.com
Support: clients@supportpro.com
Skype ID: sales_supportpro

Postal Address

1020 Milwaukee Ave, #245,
Deerfield, IL-60015
USA

©2022  SupportPRO.com. All Rights Reserved