AWS CloudFormation

CloudFormation is an Infrastructure as Code (IaC) product — you can create manage, and remove infrastructure using JSON or YAML.  CloudFormation is effective if you frequently deploy the same  infrastructure or you require guaranteed consistent configuration.

CloudFormation Fundamentals

A CloudFor mation (CFN/cfn) template is used to initially create a CFN stack. A stack creates, updates, and deletes physical AWS resources based on its logical resources, which are based on the contents of a template.

  • A CFN template is written in JSON or YAML.
  • A template can create up to 200 resources.
  • If a stack is deleted, then, by default, any resources it has created are also deleted.
  • A stack can be updated by uploading a new version of a template.
  • New logical resources cause new physical resources.
  • Removed logical resources cause the stack to delete physical resources.
  • Changed logical resources update with some disruption or replace physical resources.