Question 559 of 1,546
Deployment, Provisioning, and AutomationmediumMultiple ChoiceObjective-mapped

SOA-C02 Deployment, Provisioning, and Automation Practice Question

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?

Question 1mediummultiple choice
Full question →

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 controls the creation success of a resource based on signals, but does not affect updates or prevent replacement.

  • DeletionPolicy

    Why it's wrong here

    DeletionPolicy determines what happens when a resource is deleted; setting it to Retain would cause replacement to fail, but this is not the intended or clean solution.

  • StackPolicy

    Why this is correct

    StackPolicy allows you to explicitly deny update actions (including replacement) on specific resources, causing updates that require replacement to fail.

    Related concept

    StackPolicy defines update permissions for resources in a CloudFormation stack.

  • UpdateReplacePolicy

    Why it's wrong here

    CloudFormation does not have an attribute named UpdateReplacePolicy. The correct approach is StackPolicy.

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.

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.

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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

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.

Loading comments…

Sign in to join the discussion.

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.