AWS · Management and Governance

AWS CloudFormation

Infrastructure as code: describe AWS resources in templates and let CloudFormation create, update and delete them as stacks.

On the SAA-C03 exam listAutomationDisaster recovery

What it is and what problem it solves

AWS CloudFormation provisions AWS resources from templates (JSON or YAML) that declare what should exist. A deployed template is a stack; updating the template updates the stack, with change sets to preview changes and rollback if something fails. StackSets deploy stacks across many accounts and Regions, drift detection finds manual changes, and nested stacks and modules reuse components. The AWS CDK and AWS SAM generate CloudFormation templates.

When to use it

  • Repeatable environments (development, staging, production) built the same way.
  • Disaster recovery: rebuilding infrastructure in another Region from code.
  • Governed, reviewed infrastructure changes through pipelines.

When to avoid it

  • Teams standardised on another IaC tool such as Terraform.
  • One-off experiments where code adds overhead (but capture them later).

Limits and quotas

ItemValueContextSource
Resources per template 500 Split larger designs with nested stacks. Source
checked
Outputs per template 200 Source
checked

Quotas and limits change. Check the linked source before designing around a number.

Cost model

What you pay for

No charge for AWS resource types; you pay for the resources created. Third-party resource types and hooks are billed per handler operation.

Where it is cost-efficient

Any environment you build more than once.

Where costs grow

Not applicable to AWS resource types.

Cost controls and common surprises

Delete stacks for temporary environments so their resources go too.

Prices differ by Region and change over time; see the pricing page linked under Sources.

Security

Controls the service provides

Service roles that limit what a stack can do, stack policies to protect resources from updates, termination protection, and hooks that check resources before creation.

What you configure

Review change sets, keep templates in version control, never hard-code secrets (use dynamic references to Secrets Manager or Parameter Store), and restrict who can deploy.

Logging and monitoring

Stack events, CloudTrail.

Related security services

IAM, Secrets Manager, Parameter Store, Service Catalog, Config.

Shared responsibility

AWS provisions what you declare. You own the templates and their correctness.

Common service combinations

CDK and SAM to author, CodePipeline or other CI/CD to deploy, StackSets for organisations, Service Catalog for approved products.

Business application examples

  • One template deploys the whole application stack; StackSets put a security baseline into every account.

Exam cues and common confusions

  • Infrastructure as code, repeatable environments, DR rebuild in another Region: CloudFormation.
  • Deploy to many accounts and Regions: StackSets.
  • Preview changes: change sets. Find manual changes: drift detection.

Related

Courses and lessons

Services, comparisons and patterns

Sources

Independent study material, not affiliated with or endorsed by Amazon Web Services. AWS and service names are trademarks of Amazon.com, Inc. or its affiliates.

Last reviewed · By the ByteCamel team · How we write content

Was this page helpful?

Report a mistake