nerdexam
Amazon

DBS-C01 · Question #169

A database specialist is creating an AWS CloudFormation stack. The database specialist wants to prevent accidental deletion of an Amazon RDS ProductionDatabase resource in the stack. Which solution…

The correct answer is D. Create a stack policy to prevent updates. Include "Effect" : "Deny" and "Resource". https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack- "When you set a stack policy, all resources are protected by default. To allow updates on all resources, we add an Allow statement that allows all actions on all resources. Although the Allow…

Submitted by katya_ua· Mar 6, 2026Management and Operations

Question

A database specialist is creating an AWS CloudFormation stack. The database specialist wants to prevent accidental deletion of an Amazon RDS ProductionDatabase resource in the stack. Which solution will meet this requirement?

Options

  • ACreate a stack policy to prevent updates. Include "Effect" : "ProductionDatabase" and
  • BCreate an AWS CloudFormation stack in XML format. Set xAttribute as false.
  • CCreate an RDS DB instance without the DeletionPolicy attribute. Disable termination protection.
  • DCreate a stack policy to prevent updates. Include "Effect" : "Deny" and "Resource" :

How the community answered

(47 responses)
  • A
    15% (7)
  • B
    6% (3)
  • C
    2% (1)
  • D
    77% (36)

Explanation

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/protect-stack- "When you set a stack policy, all resources are protected by default. To allow updates on all resources, we add an Allow statement that allows all actions on all resources. Although the Allow statement specifies all resources, the explicit Deny statement overrides it for the resource with the ProductionDatabase logical ID. This Deny statement prevents all update actions, such as replacement or deletion, on the ProductionDatabase resource."

Topics

#CloudFormation#stack policies#accidental deletion#resource protection

Community Discussion

No community discussion yet for this question.

Full DBS-C01 Practice