- A
CreationPolicy
Why wrong: CreationPolicy is used to wait for signals from resources before proceeding with stack creation; it does not affect updates or replacement prevention.
- B
DeletionPolicy
Why wrong: DeletionPolicy determines what happens to a resource when its stack is deleted, not during updates; it does not prevent replacement.
- C
StackPolicy
StackPolicy allows you to define update permissions for stack resources, including denying update actions that would cause replacement, effectively causing the update to fail if such changes are attempted. This meets the requirement.
- D
UpdateReplacePolicy
Why wrong: UpdateReplacePolicy is a CloudFormation attribute that controls the disposition of a resource when it is replaced during an update (e.g., retain or delete), but it does not prevent the replacement from occurring. Therefore, it does not cause the update to fail; it only specifies what happens to the old resource after replacement.
CloudFormation Stack Policy to Prevent Replacement
This SOA-C02 practice question tests your understanding of deployment, provisioning, and automation. Match the stated requirement to the specific cloud service, access model, or configuration option — many options are valid in isolation but not for this scenario. A key principle to apply: stackPolicy defines update permissions for resources in a CloudFormation stack.. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.
A SysOps administrator uses AWS CloudFormation to deploy a stack that includes an Amazon EC2 instance. The administrator wants to ensure that if the stack is updated, the EC2 instance is not accidentally replaced if its properties change. The administrator wants the stack update to fail when a property change would require replacement. Which CloudFormation feature should the administrator use?
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
StackPolicy
Option C, StackPolicy, is correct because a stack policy is a JSON document that defines which stack resources can be updated or replaced during a stack update. By setting a Deny effect on update actions for the EC2 instance, the administrator can prevent any property change that would cause replacement, causing the update to fail instead of replacing the instance. This directly meets the requirement to block accidental replacement.
Key principle: StackPolicy defines update permissions for resources in a CloudFormation stack.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
CreationPolicy
Why it's wrong here
CreationPolicy is used to wait for signals from resources before proceeding with stack creation; it does not affect updates or replacement prevention.
- ✗
DeletionPolicy
Why it's wrong here
DeletionPolicy determines what happens to a resource when its stack is deleted, not during updates; it does not prevent replacement.
- ✓
StackPolicy
Why this is correct
StackPolicy allows you to define update permissions for stack resources, including denying update actions that would cause replacement, effectively causing the update to fail if such changes are attempted. This meets the requirement.
Related concept
StackPolicy defines update permissions for resources in a CloudFormation stack.
- ✗
UpdateReplacePolicy
Why it's wrong here
UpdateReplacePolicy is a CloudFormation attribute that controls the disposition of a resource when it is replaced during an update (e.g., retain or delete), but it does not prevent the replacement from occurring. Therefore, it does not cause the update to fail; it only specifies what happens to the old resource after replacement.
Common exam traps
Common exam trap: answer the scenario, not the keyword
The trap here is that candidates often confuse UpdateReplacePolicy (which manages what happens to the old resource after replacement) with a mechanism to prevent replacement, but UpdateReplacePolicy does not block the update—it only controls the disposition of the replaced resource.
Detailed technical explanation
How to think about this question
A StackPolicy is evaluated during any stack update operation (e.g., UpdateStack) and can include Effect: Deny on specific resource types (e.g., AWS::EC2::Instance) with a NotResource or Resource condition. Under the hood, CloudFormation checks the stack policy before applying changes; if a Deny matches the intended update action, the entire update fails with a 'StackPolicyViolation' error. This is useful in production environments where critical resources like database instances or EC2 instances must never be replaced inadvertently.
KKey Concepts to Remember
- StackPolicy defines update permissions for resources in a CloudFormation stack.
- It uses a JSON structure similar to IAM policies to specify actions and resources.
- StackPolicy can prevent 'Update:Replace', 'Update:Delete', and 'Update:Modify' actions.
- It is applied to the stack itself, not individual resources within the template.
TExam Day Tips
- Watch for words such as best, first, most likely and least administrative effort.
- Review why wrong options are wrong, not only why the correct option is correct.
Key takeaway
StackPolicy defines update permissions for resources in a CloudFormation stack.
Real-world example
How this comes up in practice
A cloud solutions architect for a retail company is evaluating services for a new workload. The correct answer here reflects best practice for the specific scenario described — not a general cloud recommendation. StackPolicy defines update permissions for resources in a CloudFormation stack. Cloud exam questions reward reading the constraint carefully: the same technology can be right or wrong depending on the use case.
What to study next
Got this wrong? Here's your next step.
Review stackPolicy defines update permissions for resources in a CloudFormation stack., then practise related SOA-C02 questions on the same topic to reinforce the concept.
- →
Deployment, Provisioning, and Automation — study guide chapter
Learn the concepts, then practise the questions
- →
Deployment, Provisioning, and Automation practice questions
Targeted practice on this topic area only
- →
All SOA-C02 questions
1,546 questions across all exam domains
- →
AWS Certified SysOps Administrator Associate SOA-C02 study guide
Full concept coverage aligned to exam objectives
- →
SOA-C02 practice test guide
How to use practice tests most effectively before exam day
Related practice questions
Related SOA-C02 practice-question pages
Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.
Monitoring, Logging, and Remediation practice questions
Practise SOA-C02 questions linked to Monitoring, Logging, and Remediation.
Reliability and Business Continuity practice questions
Practise SOA-C02 questions linked to Reliability and Business Continuity.
Deployment, Provisioning, and Automation practice questions
Practise SOA-C02 questions linked to Deployment, Provisioning, and Automation.
Security and Compliance practice questions
Practise SOA-C02 questions linked to Security and Compliance.
Networking and Content Delivery practice questions
Practise SOA-C02 questions linked to Networking and Content Delivery.
Cost and Performance Optimization practice questions
Practise SOA-C02 questions linked to Cost and Performance Optimization.
SOA-C02 fundamentals practice questions
Practise SOA-C02 questions linked to SOA-C02 fundamentals.
SOA-C02 scenario practice questions
Practise SOA-C02 questions linked to SOA-C02 scenario.
SOA-C02 troubleshooting practice questions
Practise SOA-C02 questions linked to SOA-C02 troubleshooting.
Practice this exam
Start a free SOA-C02 practice session
Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.
FAQ
Questions learners often ask
What does this SOA-C02 question test?
Deployment, Provisioning, and Automation — This question tests Deployment, Provisioning, and Automation — StackPolicy defines update permissions for resources in a CloudFormation stack..
What is the correct answer to this question?
The correct answer is: StackPolicy — Option C, StackPolicy, is correct because a stack policy is a JSON document that defines which stack resources can be updated or replaced during a stack update. By setting a Deny effect on update actions for the EC2 instance, the administrator can prevent any property change that would cause replacement, causing the update to fail instead of replacing the instance. This directly meets the requirement to block accidental replacement.
What should I do if I get this SOA-C02 question wrong?
Review stackPolicy defines update permissions for resources in a CloudFormation stack., then practise related SOA-C02 questions on the same topic to reinforce the concept.
What is the key concept behind this question?
StackPolicy defines update permissions for resources in a CloudFormation stack.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more ways this is tested on SOA-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 SysOps administrator uses AWS CloudFormation to deploy a stack that includes an Amazon EC2 instance and a security group. The administrator wants to ensure that when the stack is updated, the security group is not accidentally replaced if its properties change. The administrator wants to receive a failure if an update would require replacement of the security group. Which CloudFormation feature should the administrator use?
medium- A.Add a 'DeletionPolicy' attribute set to 'Retain' on the security group resource.
- B.Add a 'CreationPolicy' attribute to the security group resource.
- ✓ C.Define a stack policy that denies replacement of the security group resource.
- D.Use an 'UpdatePolicy' attribute with 'AutoScalingReplacingUpdate' on the security group.
Why C: Option C is correct because a stack policy can explicitly deny update actions that would replace a resource, such as the security group. By defining a stack policy with a Deny statement for the 'Replace' effect on the security group's logical resource ID, CloudFormation will fail the update if any property change triggers a replacement, preventing accidental deletion and recreation.
Keep practising
More SOA-C02 practice questions
- A company uses an Amazon DynamoDB table with on-demand capacity mode. The table handles a workload with a steady baselin…
- A company uses Amazon CloudWatch Logs to store application logs. The SysOps administrator needs to count the occurrences…
- A SysOps administrator needs to monitor the CPU utilization of an Amazon EC2 instance and send an alert when it exceeds…
- A SysOps administrator needs to monitor the CPU utilization of an Amazon EC2 instance fleet and send an alert when the a…
- A company's security policy requires that all Amazon S3 buckets must have server-side encryption enabled. The SysOps adm…
- An organization is using AWS CloudFormation to deploy infrastructure. The SysOps administrator needs to ensure that if a…
Last reviewed: Jun 11, 2026
This SOA-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 SOA-C02 exam.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.