Which action should be taken to meet these requirements?
Edit the template to remove the RDS resources and update the stack.
Enable termination protection on the stack.
Set the DeletionPolicy attribute for RDS resources to Retain in the template.
Set the deletion-protection parameter on RDS resources.
Explanations:
Removing the RDS resources from the CloudFormation template and updating the stack will cause the RDS instances to be deleted when the stack is deleted, which does not meet the requirement of keeping the RDS instances running.
Enabling termination protection on the stack prevents the entire stack from being deleted, but does not prevent individual resources (like RDS instances) from being deleted when the stack is deleted.
Setting the DeletionPolicy attribute for RDS resources to “Retain” ensures that the RDS instances are preserved even when the CloudFormation stack is deleted. This meets the requirement of keeping the RDS instances running after stack deletion.
The “deletion-protection” parameter applies to RDS instances but needs to be used in the context of individual instance settings, not CloudFormation templates. It does not directly prevent deletion of RDS instances when the stack is deleted.