0
votes

In this article, there is a nice explanation about CloudFormation.

If you don’t know CloudFormation, then it’s important to know that CloudFormation is the Infrastructure as Code (IaC) solution of AWS. It is in the same category of tools as Terraform (a very good comparison between CloudFormation and Terraform can be found here).

With CloudFormation you can declaratively specify the AWS infrastructure that you need for your cloud application in a YAML or JSON file, called a template, and then deploy this template. During the deployment, AWS automatically provisions all the resources that you specified in your template.

If you already deployed before and just made changes to your template, then AWS calculates a changeset and applies it, so that the state of your infrastructure matches your the specification (just like Kubernetes).

Imagine the following scenario:

  1. Create a new project and set up a CloudFormation template for this project.
  2. Successfully deployed this template.
  3. Then, change the code.
  4. Deploy it again.

In term of step4, how does CloudFormation know this stack has been created before, and just update it?

Is there a unique UUID in the template to identify all the resources relating to this template?

2

2 Answers

2
votes

The identifier is the stack name that you specify when you deploy your template with the create-stack command, as it should be unique in the region in which you are creating the stack.

0
votes

Well, you actually go and actively update a certain stack using new template/new parameter values.