ladderlore
  • Type a service name, like S3 or IAM.

Service · Management and Governance

AWS CloudFormation

Builds and manages AWS resources from a template, as a single unit called a stack.

Stack
Template in JSON or YAML
CloudFormation
VPCEC2RDS
  1. 1You write a template and give it to CloudFormation.
  2. 2CloudFormation creates every resource in the right order, as one stack.
CloudFormation turns one template into a stack of resources.

Step by step

  1. 1You write a template and give it to CloudFormation.
  2. 2CloudFormation creates every resource in the right order, as one stack.
  • Template

    A JSON or YAML file that describes the resources you want.

  • Stack

    The resources built from one template, managed as one unit.

  • Change set

    A preview of what an update will change, before it runs.

  • Rollback

    By default, if creating or updating a stack fails, the changes are undone.

  • Drift detection

    Finds resources that were changed outside CloudFormation.

  • StackSets

    One template deployed to many accounts and Regions in one operation.

Words to know.

1 / 2

  • Template

    A JSON or YAML file that describes the resources you want.

  • Stack

    The resources built from one template, managed as one unit.

  • Change set

    A preview of what an update will change, before it runs.

  • Rollback

    By default, if creating or updating a stack fails, the changes are undone.

2 / 2

  • Drift detection

    Finds resources that were changed outside CloudFormation.

  • StackSets

    One template deployed to many accounts and Regions in one operation.

Words to know.

What it is

AWS CloudFormation is the AWS service for infrastructure as code. You write a template, a text file in JSON or YAML, that lists the resources you want, such as a VPC, EC2 instances and a database. CloudFormation works out the right order and creates them all for you, as one unit called a stack.

To change the environment, you edit the template and update the stack. A change set shows what will change before anything happens. By default, if creating or updating a stack fails, CloudFormation rolls the changes back. Deleting the stack deletes its resources, so nothing is left running by mistake.

What it is

There is no extra charge for CloudFormation itself when it manages AWS resources. You pay for the resources that the stack creates. With StackSets, one template can be deployed to many accounts and Regions in a single operation.

Remember

  • Template = the plan. Stack = the resources built from it.
  • The same template gives the same result in any account or Region.
  • It works out the order for you, for example the network before the servers inside it.
  • Drift detection finds resources that someone changed outside CloudFormation.

Remember

  • No extra charge for AWS resources: you pay for what the stack creates.

On the exam

  • “Provision AWS resources from a template” or “model infrastructure as code” points to AWS CloudFormation.
  • “Upload application code and let AWS handle the servers, scaling and load balancing” is AWS Elastic Beanstalk. CloudFormation is for describing the infrastructure yourself.