AWS Certified SysOps Administrator – Associate — Question 242
A company uses AWS CloudFormation to manage a stack of Amazon EC2 instances on AWS. A SysOps administrator 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 to Retain ensures that the EC2 instances and their data are kept even when the stack is deleted. Option A incorrectly uses Snapshot, which only creates snapshots but doesn't retain the instances. Options B and C involve backup solutions that are external to CloudFormation and do not directly meet the requirement of retaining instances upon stack deletion.