AWS Certified CloudOps Engineer Associate SOA-C03 [2026]

AWS CloudFormation: Templates, Stacks, StackSets, and Change Sets

Study AWS CloudFormation fundamentals, including template-driven provisioning, stacks, StackSets, change sets, benefits, costs, and scenario-based feature selection for the SOA-C03 exam.

AWS Certified CloudOps Engineer Associate SOA-C03 [2026]AWS Certified CloudOps Engineer Associate SOA-C03 [2026]Updated Sep 1, 2026
Study options
WatchComing later
ListenComing later
ReadAvailable
ReviewComing later

Study guide

Technical reference and lesson notes

AWS CloudFormation: Templates, Stacks, StackSets, and Change Sets

Purpose of This Lesson

AWS CloudFormation is an infrastructure-as-code service that lets you define AWS infrastructure and applications in JSON or YAML templates. CloudFormation then uses the template to provision, update, manage, and delete the specified resources.

For the AWS Certified CloudOps Engineer Associate SOA-C03, the important skill is recognizing which CloudFormation feature fits a provisioning, multi-account, update-review, or lifecycle-management scenario.

Key Concepts

CloudFormation templates

A template is a text file written in JSON or YAML that describes the desired AWS environment. It acts as the set of instructions CloudFormation follows when creating resources.

A template can describe resources such as:

  • VPCs and CIDR blocks
  • Public and private subnets
  • Resources distributed across multiple Availability Zones
  • Auto Scaling groups
  • Amazon EC2 instances
  • Application Load Balancers
  • Many other AWS resources

The template is the definition; it is not itself the deployed environment.

Stacks

A stack is the collection of AWS resources created from a CloudFormation template. CloudFormation manages the resources in the stack as a unit, including their creation, updates, and deletion.

For example, a template that defines a VPC, subnets, an Auto Scaling group, EC2 instances, and an Application Load Balancer can produce one stack containing that environment.

StackSets

A StackSet extends the stack model across multiple AWS accounts and Regions. It allows stacks to be created, updated, or deleted centrally across those accounts and Regions with one operation.

Without StackSets, an administrator would need to manage separate stacks independently in each target account and Region.

Change sets

A change set is used to preview the effects of modifying an existing stack. You provide an updated template, and CloudFormation shows the proposed changes before they are applied.

Change sets are especially useful when evaluating the impact of an update on production resources. They provide visibility into the planned modification but do not apply the update automatically merely because the change set was created.

Infrastructure Provisioning and Lifecycle Management

CloudFormation simplifies infrastructure deployment by making the API calls required to create the resources described in a template. Instead of manually configuring each resource, an operator submits the template and CloudFormation provisions the environment.

A typical template-driven environment might include:

  1. A VPC with a defined CIDR block.
  2. Public and private subnets across multiple Availability Zones.
  3. An Auto Scaling group and EC2 instances.
  4. An Application Load Balancer.

The same template can be reused to create consistent environments. This reduces the likelihood of configuration differences and human error compared with manually repeating the same steps.

CloudFormation can also manage updates and dependencies between resources. When the environment is no longer needed, the stack can be deleted, allowing CloudFormation to issue the relevant API calls to terminate or remove the resources defined by the stack. Resource-specific behavior and deletion constraints still matter operationally, so deletion should not be treated as risk-free.

Benefits

  • Consistency: Correctly defined templates can be reused to produce repeatable environments.
  • Reduced manual effort: Complex infrastructure can be provisioned in minutes rather than configured resource by resource.
  • Version control and peer review: Templates can be stored, reviewed, and tracked as code.
  • Lifecycle management: CloudFormation supports stack creation, updates, and deletion.
  • Dependency management: Resources and their relationships can be managed as part of one declared environment.
  • No separate CloudFormation usage fee: CloudFormation itself is free to use, but AWS charges for the resources provisioned by the templates.

Exam- or Assessment-Relevant Takeaways

  • Choose a template when the scenario asks for the declarative JSON or YAML definition of the desired infrastructure.
  • Choose a stack when the question describes the deployed collection of resources managed as one unit.
  • Choose a StackSet when the same infrastructure must be centrally created, updated, or deleted across multiple accounts and/or Regions.
  • Choose a change set when an existing stack must be modified and the operator needs to review the expected changes before applying them.
  • CloudFormation improves consistency and repeatability, but it does not make the underlying resources free.
  • A CloudFormation stack can include related networking, compute, scaling, and load-balancing resources rather than only a single resource type.
  • A template is reusable source code; a stack is the deployed environment produced from that code.

Tool / Feature Decision Guide

RequirementAppropriate featureWhy
Define the desired AWS infrastructure in JSON or YAMLCloudFormation templateThe template contains the infrastructure instructions.
Deploy and manage the resources described by one templateStackA stack represents the deployed resource collection as a managed unit.
Deploy equivalent stacks across multiple accounts and RegionsStackSetStackSets provide centralized multi-account and multi-Region operations.
Inspect the effect of a proposed stack update before applying itChange setChange sets expose proposed modifications before implementation.
Repeat a correctly designed environmentReuse the templateReusing the template reduces manual variation and mistakes.
Remove an environment managed by CloudFormationDelete the stackCloudFormation initiates deletion of the stack’s defined resources.

Common Traps / Misconceptions

  • Confusing a template with a stack: The template is the JSON or YAML definition; the stack is the deployed collection of resources.
  • Using a stack when the requirement is multi-account deployment: A single stack does not provide the centralized multi-account and multi-Region operation described for StackSets.
  • Treating a change set as an applied update: A change set previews proposed changes. The update still needs to be implemented.
  • Assuming CloudFormation makes infrastructure free: CloudFormation has no separate usage charge in the lesson context, but the provisioned AWS resources still incur their normal charges.
  • Assuming CloudFormation only creates resources: CloudFormation also supports managing updates, dependencies, and deletion of the stack.
  • Assuming templates eliminate all operational risk: A template reduces manual configuration errors, but incorrect template definitions can consistently deploy incorrect infrastructure.
  • Ignoring deletion consequences: Deleting a stack can terminate or remove its resources, so stack deletion must be handled carefully.

Real-World Engineer / Analyst Notes

Store CloudFormation templates in version control and use peer review before deploying significant infrastructure changes. This creates an auditable history of how the environment definition changed over time.

For production updates, use a change set to inspect the proposed impact before implementation. This is particularly valuable when a template change affects a shared network, compute fleet, or load-balancing architecture.

When designing reusable templates, keep the intended environment structure clear: networking, subnets, compute, scaling, and traffic distribution may all be represented together, but their relationships and dependencies should be understood before deployment.

Remember the cost boundary: CloudFormation is the provisioning and management mechanism, while the resources it creates are the billable components.

Quick Reference Summary

  • Template: JSON or YAML instructions describing desired AWS resources.
  • Stack: Deployed collection of resources created and managed from a template.
  • StackSet: Centralized management of stacks across multiple accounts and Regions.
  • Change set: Preview of proposed changes to an existing stack.
  • Primary value: Consistent, repeatable infrastructure provisioning with less manual effort.
  • Lifecycle capabilities: Create, update, manage dependencies, and delete stack resources.
  • Cost principle: CloudFormation itself is free to use; provisioned resources are charged.

Flashcards

Q: A team needs to define a VPC, subnets, EC2 instances, an Auto Scaling group, and an Application Load Balancer as reusable infrastructure code. What should it create?

A: A CloudFormation template written in JSON or YAML. The template describes the desired infrastructure and can be reused for consistent deployments.

Q: What is the difference between a CloudFormation template and a stack?

A: A template is the JSON or YAML definition of the desired environment. A stack is the deployed collection of AWS resources created and managed from that template.

Q: An organization must deploy the same environment in several AWS accounts and Regions from one central operation. Which CloudFormation capability is appropriate?

A: Use a StackSet. It supports centralized creation, updating, and deletion of stacks across multiple accounts and Regions.

Q: When should an engineer use a change set instead of immediately updating a stack?

A: Use a change set when the engineer needs to review the expected effects of a new template before applying the update, especially for production resources.

Q: Does creating a change set automatically apply the proposed stack update?

A: No. A change set previews the proposed changes; the update must still be implemented.

Q: A manually configured VPC is repeatedly rebuilt by different operators and develops inconsistent settings. How can CloudFormation help?

A: A correctly defined template can be reused to provision the VPC consistently, reducing variation and human configuration mistakes.

Q: What happens conceptually when a CloudFormation stack is deleted?

A: CloudFormation makes the relevant API calls to delete or terminate the resources managed by the stack, returning the environment toward its prior state.

Q: Which CloudFormation feature represents the deployed environment as a managed unit?

A: A stack. It groups the resources created from a template for creation, updating, and deletion.

Q: A company wants a reviewable history of infrastructure-definition changes. What practice does the lesson support?

A: Store CloudFormation templates in version control and use peer review. This preserves an editing history and supports controlled changes.

Q: What is the main cost misconception about CloudFormation?

A: CloudFormation itself is free to use, but AWS still charges for the resources provisioned through CloudFormation.

Q: A requirement says “preview the impact of modifying an existing stack without affecting production resources.” Which feature matches it?

A: A change set, because it shows the proposed stack changes before they are implemented.

Q: How do StackSets differ from ordinary stacks in scope?

A: An ordinary stack manages a deployed resource collection, while StackSets coordinate stacks across multiple AWS accounts and Regions through centralized operations.

Practice Questions

Question 1

An operations team has a CloudFormation template for a standard application environment. It must deploy that environment into six AWS accounts across two Regions, and administrators want to manage the deployments centrally. Which option is best?

A. Create one change set in the management account

B. Use a single stack in the primary Region

C. Use a StackSet

D. Store six copies of the template without CloudFormation stacks

Correct answer: C. Use a StackSet.

A StackSet is designed to create, update, and delete stacks across multiple accounts and Regions with centralized operations.

Question 2

Before updating a production stack with a revised template, an engineer wants to inspect the expected infrastructure changes. Which CloudFormation feature should be used?

A. StackSet

B. Change set

C. New standalone template with no stack

D. Manual resource configuration

Correct answer: B. Change set.

A change set previews the proposed modifications to an existing stack before the update is applied.

Question 3

Which statement correctly distinguishes CloudFormation templates from stacks?

A. A template is a deployed resource collection, while a stack is a JSON file.

B. A template defines desired resources, while a stack is the deployed collection managed from that definition.

C. A template is used only for multi-account deployments, while a stack is used only for one resource.

D. A template previews updates, while a stack stores peer-review history.

Correct answer: B.

The template contains the infrastructure instructions, and the stack is the resulting managed environment.

Question 4

A team claims that adopting CloudFormation removes all charges for the infrastructure because the service is free. Which correction is accurate?

A. CloudFormation charges only when a stack is deleted.

B. CloudFormation is free, and all resources created by it are also free.

C. CloudFormation itself is free to use, but the provisioned AWS resources are charged.

D. CloudFormation charges a fixed fee for every template line.

Correct answer: C.

The lesson distinguishes the free CloudFormation capability from the normal charges for the AWS resources it provisions.

Question 5

An administrator wants to remove an environment that was created as one CloudFormation stack. Which action best matches the stack lifecycle model?

A. Delete the stack so CloudFormation can issue the relevant resource deletion calls.

B. Delete only the template file and leave the stack running.

C. Create a StackSet in the same account before deleting resources manually.

D. Create a change set and assume it removes the resources automatically.

Correct answer: A.

Deleting the stack directs CloudFormation to terminate or delete the resources managed by that stack; deleting only the template does not remove the deployed environment.

WordPress Metadata

Suggested Slug:
aws-cloudformation-templates-stacks-stacksets-change-sets

Meta Description:
Study AWS CloudFormation fundamentals, including template-driven provisioning, stacks, StackSets, change sets, benefits, costs, and scenario-based feature selection for the SOA-C03 exam.

Tags:
AWS CloudFormation, AWS Certified CloudOps Engineer, SOA-C03, Infrastructure as Code, CloudFormation Templates, CloudFormation Stacks, CloudFormation StackSets, CloudFormation Change Sets, AWS Infrastructure Management