AWS Certified SysOps Administrator – Associate — Question 188
An AWS CloudFormation template creates an Amazon RDS instance. This template is used to build up development environments as needed and then delete the stack when the environment is no longer required. The RDS-persisted data must be retained for further use, even after the CloudFormation stack is deleted.
How can this be achieved in a reliable and efficient way?
Answer options
- A. Write a script to continue backing up the RDS instance every five minutes.
- B. Create an AWS Lambda function to take a snapshot of the RDS instance, and manually invoke the function before deleting the stack.
- C. Use the Snapshot Deletion Policy in the CloudFormation template definition of the RDS instance.
- D. Create a new CloudFormation template to perform backups of the RDS instance, and run this template before deleting the stack.
Correct answer: C
Explanation
The correct answer is C because the Snapshot Deletion Policy allows the RDS snapshots to be retained even after the CloudFormation stack is deleted. Option A is inefficient as it requires constant backup scripts, while option B relies on manual intervention, which can lead to human error. Option D involves creating a new template, which is unnecessary when the deletion policy can handle snapshot retention directly.