AWS Certified Solutions Architect Professional SAP-C02 Practice Question
Your company operates a production environment that is defined entirely in AWS CloudFormation and deployed through an automated AWS CodePipeline. The stack includes a critical Amazon RDS for MySQL instance. Compliance requires that any pipeline update that would replace or delete this database must be blocked automatically, while in-place modifications (for example, changing the backup window) must proceed. The control must be enforced natively by CloudFormation so that it applies regardless of which IAM identity or deployment tool performs the update, and it should introduce the least ongoing operational burden.
Which solution meets these requirements?
Add a DeletionPolicy of Retain to the DB instance in the template to ensure the database cannot be removed.
Attach a CloudFormation stack policy that denies the Update:Replace and Update:Delete actions for the DB instance resource.
Have the pipeline create a change set for every update and require a manual approval step before execution.
Enable termination protection on the CloudFormation stack so that destructive actions are rejected automatically.
A CloudFormation stack policy can deny the Update:Replace and Update:Delete actions for the specific DB instance resource. When the pipeline attempts an update that would replace or delete the database, CloudFormation interprets the stack policy and fails the operation immediately. Property changes that do not require replacement are still allowed because Update:Modify is not denied.
Termination protection only blocks an attempt to delete the entire stack; it does not stop a stack update that replaces a single resource. DeletionPolicy Retain preserves the resource after deletion but does not prevent the replacement from occurring. Requiring manual approval of change sets provides visibility but depends on human intervention and does not automatically fail the deployment, so it adds operational overhead and does not fully satisfy the requirement.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a CloudFormation stack policy?
Open an interactive chat with Bash
How does termination protection differ from a stack policy?
Open an interactive chat with Bash
What is the difference between DeletionPolicy Retain and a stack policy?
Open an interactive chat with Bash
AWS Certified Solutions Architect Professional SAP-C02
Design for New Solutions
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .