DBS-C01 · Question #232
A company has an AWS CloudFormation stack that defines an Amazon RDS DB instance. The company accidentally deletes the stack and loses recent data from the DB instance. A database specialist must chan
The correct answer is A. Set the DeletionProtection property to True. D. Set the DeleteAutomatedBackups property to False. F. Set the DeletionPolicy attribute to Retain.. To prevent accidental data loss from an Amazon RDS DB instance when its AWS CloudFormation stack is deleted, configure the CloudFormation template to set DeletionProtection to True for the RDS resource, set DeleteAutomatedBackups to False, and apply the DeletionPolicy: Retain att
Question
A company has an AWS CloudFormation stack that defines an Amazon RDS DB instance. The company accidentally deletes the stack and loses recent data from the DB instance. A database specialist must change the CloudFormation template for the RDS resource to reduce the chance of accidental data loss from the DB instance in the future. Which combination of actions should the database specialist take to meet this requirement? (Choose three.)
Options
- ASet the DeletionProtection property to True.
- BSet the MultiAZ property to True.
- CSet the TerminationProtection property to True.
- DSet the DeleteAutomatedBackups property to False.
- ESet the DeletionPolicy attribute to No.
- FSet the DeletionPolicy attribute to Retain.
How the community answered
(40 responses)- A65% (26)
- B20% (8)
- C10% (4)
- E5% (2)
Why each option
To prevent accidental data loss from an Amazon RDS DB instance when its AWS CloudFormation stack is deleted, configure the CloudFormation template to set `DeletionProtection` to `True` for the RDS resource, set `DeleteAutomatedBackups` to `False`, and apply the `DeletionPolicy: Retain` attribute to the resource.
Setting the `DeletionProtection` property to `True` for the RDS DB instance prevents the instance from being deleted even if its CloudFormation stack or the resource within the stack is removed, safeguarding data.
Setting the `MultiAZ` property to `True` provides high availability within a region but does not prevent the entire DB instance from being deleted if the CloudFormation stack is removed.
The `TerminationProtection` property is used for Amazon EC2 instances, not for Amazon RDS DB instances.
Setting the `DeleteAutomatedBackups` property to `False` ensures that automated backups are retained after the DB instance is deleted, allowing for point-in-time recovery and preventing data loss from backups.
The value `No` is not a valid `DeletionPolicy` attribute for AWS CloudFormation resources; valid options are `Delete`, `Retain`, or `Snapshot`.
Applying the `DeletionPolicy` attribute to `Retain` on the RDS resource in CloudFormation ensures that the DB instance is not deleted when the CloudFormation stack is deleted, preserving the database and its data.
Concept tested: CloudFormation RDS deletion protection and backup retention
Source: https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-deletionpolicy.html
Topics
Community Discussion
No community discussion yet for this question.