All services

Management & Governance

AWS CloudFormation

Infrastructure as code using YAML/JSON templates.

Official docs

Overview

CloudFormation provisions and manages stacks of AWS resources from declarative templates, with change sets, drift detection and StackSets for multi-account.

When to use it

  • Reproducible environments
  • Multi-account/region rollouts
  • Compliance via versioned IaC

Setup

  1. Author template.yml.
  2. Deploy: `aws cloudformation deploy --template-file template.yml --stack-name qa-env`.
  3. Use Change Sets to preview updates.

How to use

Detect drift
aws cloudformation detect-stack-drift --stack-name qa-env

QA use cases

  • Spin up a complete QA environment per branch and tear it down at end of day to save cost.