Persisting EC2 Data Across Terminations with Default Settings

DEA-C01 By islever Editorial Last updated

Short answer

C Launch new EC2 instances using an AMI backed by instance store and attach an additional EBS volume for data, as non-root EBS volumes are preserved by default upon termination.

Question

A company is developing an application that runs on Amazon EC2 instances. Currently, the data that the application generates is temporary. However, the company needs to persist the data, even if the EC2 instances are terminated. A data engineer must launch new EC2 instances from an Amazon Machine Image (AMI) and configure the instances to preserve the data. Which solution will meet this requirement?
  1. Launch new EC2 instances by using an AMI that is backed by an EC2 instance store volume that contains the application data. Apply the default settings to the EC2 instances.
  2. Launch new EC2 instances by using an AMI that is backed by a root Amazon Elastic Block Store (Amazon EBS) volume that contains the application data. Apply the default settings to the EC2 instances.
  3. Launch new EC2 instances by using an AMI that is backed by an EC2 instance store volume. Attach an Amazon Elastic Block Store (Amazon EBS) volume to contain the application data. Apply the default settings to the EC2 instances. Correct Answer
  4. Launch new EC2 instances by using an AMI that is backed by an Amazon Elastic Block Store (Amazon EBS) volume. Attach an additional EC2 instance store volume to contain the application data. Apply the default settings to the EC2 instances.

Key Takeaways

The question tests knowledge of EC2 storage persistence and the critical trap of assuming root EBS volumes persist by default; they do not unless explicitly configured otherwise.

This page explains how to persist application data on Amazon EC2 when instances are terminated, specifically focusing on the default DeleteOnTermination behavior of EBS volumes. It establishes that using an additional non-root EBS volume is the correct solution when default settings must be applied.

Common mistake: Many candidates choose Option B because they assume EBS data always persists regardless of termination settings, failing to notice the 'default settings' constraint which deletes the root volume.

Expert Analysis

Why the Answer Is Correct

Option C is the only valid solution because it separates the OS (on instance store) from the data (on a dedicated EBS volume). By attaching an additional EBS volume, the data resides on persistent block storage independent of the instance lifecycle. Crucially, the question mandates applying "default settings." For any attached EBS volume that is NOT the root volume, the default DeleteOnTermination attribute is false, meaning the volume survives termination. This perfectly meets the requirement to preserve data without manual configuration changes.

Why the Other Options Are Wrong

Option A uses instance store for data, which is ephemeral and lost upon termination or stop, making it unsuitable for persistence. Option B places data on the root EBS volume backed by the AMI. While EBS is persistent generally, the default DeleteOnTermination setting for the ROOT volume is true. Therefore, terminating the instance would delete the root volume and all data contained within it. Option D puts data on the instance store, which is volatile and does not survive instance termination.

Community Comment Notes

The community largely agrees with Option C, highlighting the nuance of default attributes. As user khchan123 noted, the key is understanding that "you need to attach an extra EBS volume" because the root volume's deletion policy differs from attached volumes. User ampersandor clarified that "the EBS is independent from EC2 Termination" when it is a separate attachment, whereas the root volume is tied to the instance lifecycle by default. Users like pypelyncar pointed out that while EBS is persistent, the specific context of launching from an AMI with defaults makes the root volume vulnerable to deletion.

Official Reference

https://repost.aws/knowledge-center/deleteontermination-ebs

This link opens the official vendor documentation in a new tab.

Exam Strategy

Always read the constraint 'Apply the default settings' carefully. In AWS exams, default behaviors often differ between root volumes and attached resources. If you need persistence without changing configurations, look for options that leverage the default 'do not delete' behavior of non-root resources.

Frequently Asked Questions

Why is Option B incorrect if EBS is persistent?

EBS is persistent, but the root volume has a default DeleteOnTermination=true. Attaching a separate EBS volume uses the default false, preserving the data.

Can I use Instance Store for persistent data?

No, Instance Store is ephemeral. Data is lost if the instance is stopped, hibernated, or terminated.

More DEA-C01 FAQ →

Community Votes

C
73%
B
27%

73% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Discussion 21 contributions

Compiled from public community threads and reader submissions, lightly edited for clarity. Handles and vote tallies are shown as recorded, and comments reflect the views of individual contributors.

From public community threads 21

  1. khchan123 👍 12 Answered C
    CCCCCCC - you need to attach an extra EBS volume When an instance terminates, the value of the DeleteOnTermination attribute for each attached EBS volume determines whether to preserve or delete the volume. By default, the DeleteOnTermination attribute is set to True for the root volume. ref: https://repost.aws/knowledge-center/deleteontermination-ebs
  2. HunkyBunky 👍 5 Answered C
    C - Looks better, because it will save data in all cases
  3. ampersandor 👍 4
    B: the root EBS volume will be deleted on termination by default. C: the EBS is independent from EC2 Termination
  4. mohamedTR 👍 4 Answered C
    B: by default, delete on termination is checked
  5. pypelyncar 👍 3 Answered B
    Amazon EBS volumes provide persistent block storage for EC2 instances. Data written to an EBS volume is independent of the EC2 instance lifecycle. Even if the EC2 instance is terminated, the data on the EBS volume remains intact. Launching new EC2 instances from an AMI backed by an EBS volume containing the application data ensures the data persists across instance restarts or terminations
Show 16 more comments
  1. saransh_001 👍 3 Answered C
    Check in the option B and C the default settings are mentioned. By default an EC2 instance whenever terminates, its root volume also gets terminated. So launch new EC2 instances by using an AMI that is backed by an EC2 instance store volume. Attach an Amazon Elastic Block Store (Amazon EBS) volume to contain the application data. Apply the default settings to the EC2 instances.
  2. GustonMari 👍 3 Answered C
    its C!!! B with default setting will delete the EBS volume on termination
  3. GiorgioGss 👍 3 Answered B
    This question is more for practitioner exam :)
  4. portland 👍 3 Answered C
    Using default setting means B won’t work.
  5. sdas1 👍 2
    https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/preserving-volumes-on-termination.html Root volume By default, when you launch an instance the DeleteOnTermination attribute for the root volume of an instance is set to true. Therefore, the default is to delete the root volume of the instance when the instance terminates. Non-root volume By default, when you attach a non-root EBS volume to an instance, its DeleteOnTermination attribute is set to false. Therefore, the default is to preserve these volumes. Answer is C
  6. saqib839 👍 2 Answered B
    The correct answer is B. Explanation: Amazon EBS volumes are persistent, meaning that the data remains intact even after an EC2 instance is terminated, provided that the volume isn’t set to be deleted on termination. By using an AMI that is backed by a root Amazon EBS volume that contains the application data, the data engineer ensures that the application data is stored persistently. In contrast, EC2 instance store volumes are ephemeral and would lose data when the instance terminates.
  7. saqib839 👍 2 Answered C
    The correct answer is C. Explanation: When you launch an EC2 instance from an AMI, the root volume’s DeleteOnTermination attribute is set to True by default, which means the data on that volume will be deleted when the instance is terminated. To persist data beyond the lifetime of the instance without changing any settings, you should store the data on an additional (non-root) EBS volume because non-root volumes are not automatically deleted on termination.
  8. ElFaramawi 👍 2 Answered B
    This is because Amazon EBS volumes are persistent, meaning the data is preserved even if the EC2 instance is terminated, which meets the requirement to persist the data. C is incorrect because it suggests launching instances using an EC2 instance store volume, which is ephemeral. Even though it proposes attaching an Amazon EBS volume for data, the root volume remains an instance store.
  9. Chanduchanti 👍 2 Answered C
    When an instance terminates, the value of the DeleteOnTermination attribute for each attached EBS volume determines whether to preserve or delete the volume. By default, the DeleteOnTermination attribute is set to True for the root volume.
  10. rralucard_ 👍 2 Answered B
    Amazon EBS volumes are network-attached, and they persist independently of the life of an EC2 instance. By using an AMI backed by an Amazon EBS volume, the root device for the instance is an EBS volume, which means the data will persist.
  11. mohamedTR 👍 2 Answered B
    By using an AMI backed by an Amazon EBS root volume, you ensure that the application data is preserved, even if the EC2 instances are terminated, because EBS volumes persist independently of the EC2 lifecycle.
  12. Luke97 👍 2
    Can someone explain why C is NOT right?
  13. VerRi 👍 1 Answered B
    launch EC2 using AMI with root EBS that contains data
  14. hnk 👍 5 Answered C
    C is correct
  15. Christina666 👍 5 Answered C
    ccccccc
  16. atu1789 👍 1 Answered B
    Voting for B

Reader comments & corrections

No reader corrections yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Practice All DEA-C01 Questions

Access 100 questions with complete answers and detailed explanations.

View Full DEA-C01 Practice Test →

← Back to DEA-C01 Study Guide