AWS Certified SysOps Administrator – Associate (legacy) — Question 679

A SysOps administrator manages an AWS CloudFormation template that provisions Amazon EC2 instances, an Elastic Load Balancer, and Amazon RDS instances. As part of an ongoing transformation project, CloudFormation stacks are being created and deleted continuously. The administrator needs to ensure that the RDS instances continue running after a stack has been deleted.
Which action should be taken to meet these requirements?

Answer options

Correct answer: C

Explanation

Setting the DeletionPolicy attribute to Retain in the CloudFormation template ensures that AWS keeps the specified resources, such as Amazon RDS instances, active even after the stack is deleted. Stack termination protection prevents the deletion of the entire stack rather than allowing the stack to be deleted while preserving individual resources. Enabling deletion protection directly on the RDS resource would cause the CloudFormation stack deletion process to fail instead of successfully deleting the stack and leaving the database running.