Review IAM Changes with CloudFormation Change Sets Before Deploying
A company uses AWS CloudFormation to manage infrastructure. The development team wants to promote changes from a development environment to a production environment using change sets. They need to ensure that the production stack is not updated if there are any changes to the stack's IAM policies. Which approach should the team use?
Quick Answer
The correct approach is to create a change set from the updated template, review the changes for IAM modifications, and execute only if no IAM changes are present. This works because CloudFormation change sets provide a detailed preview of every resource modification before execution, allowing you to inspect IAM policy changes specifically without risking unintended privilege escalations or security gaps. On the AWS Certified DevOps Engineer Professional DOP-C02 exam, this scenario tests your understanding of change set review capabilities versus other tools like StackSets or drift detection—a common trap is confusing drift detection (which finds manual changes) with change sets (which preview intended updates). Remember that change sets are your safety net for IAM governance: they let you validate that no new IAM actions or resources are introduced before a production deployment. A useful memory tip is “Change sets check the set of changes before you set the change in motion.”
⚠ Common exam trap
A common mix-up: candidates confuse drift detection (which is reactive) with change sets (which are proactive), or they may think that StackSets or custom resources are needed for multi-environment promotion, when in fact change sets provide a simple, native mechanism for reviewing and selectively applying updates.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Create a ChangeSet from the updated template, review the changes for IAM modifications, and execute only if no IAM changes are present.
AWS CloudFormation change sets allow you to review the proposed changes to a stack before executing them. By creating a change set from the updated template, the team can inspect the list of changes and specifically look for any modifications to IAM resources (e.g., AWS::IAM::Role, AWS::IAM::Policy). If the change set contains IAM-related changes, they can choose not to execute it, thereby preventing unintended updates to the production stack's IAM policies.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Enable drift detection on the production stack and compare with the development stack.
Why it's wrong here
Drift detection compares actual resources with template, not intended changes.
- ✓
Create a ChangeSet from the updated template, review the changes for IAM modifications, and execute only if no IAM changes are present.
Why this is correct
ChangeSets provide a preview of all changes, including IAM resource modifications.
- ✗
Use AWS CloudFormation StackSets to deploy to multiple accounts and use stack instance filters.
Why it's wrong here
StackSets are for multi-account deployments, not for reviewing changes.
- ✗
Use a custom resource in the template that checks for IAM changes and fails the update.
Why it's wrong here
Custom resources add complexity and are not the standard way.
Go deeper
Related to this question
About these practice questions
One of 1,487 original DOP-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on DOP-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A DevOps team is implementing infrastructure as code using AWS CloudFormation. They want to ensure that stack updates are reviewed and approved before execution. Which feature should they use?
easy- A.Drift detection
- B.Stack policies
- C.StackSets
- ✓ D.Change Sets
Why D: Change Sets allow you to preview the proposed changes to a CloudFormation stack before executing them. This enables the DevOps team to review and approve modifications, ensuring that only validated updates are applied. By creating a change set, you can see exactly which resources will be added, modified, or deleted, and then decide whether to execute it.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DOP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DOP-C02 exam.