AWS Certified SysOps Administrator – Associate (SOA-C03) — Question 35
A company uses AWS CloudFormation to manage a stack of Amazon EC2 instances on AWS. A CloudOps engineer needs to keep the instances and all of the instances’ data, even if someone deletes the stack.
Which solution will meet these requirements?
Answer options
- A. Set the DeletionPolicy attribute to Snapshot for the EC2 instance resource in the CloudFormation template.
- B. Automate backups by using Amazon Data Lifecycle Manager (Amazon DLM).
- C. Create a backup plan in AWS Backup.
- D. Set the DeletionPolicy attribute to Retain for the EC2 instance resource in the CloudFormation template.
Correct answer: D
Explanation
The correct answer is D because setting the DeletionPolicy attribute to Retain ensures that the EC2 instances and their data are preserved when the stack is deleted. Option A would create snapshots but would not keep the instances themselves. Options B and C involve backup strategies that do not prevent the deletion of instances when the stack is removed, making them insufficient for the requirement.