DOP-C02 Instance Store Practice Question
A company runs a stateful application on EC2 instances in an Auto Scaling group. The application stores state on local instance storage. During a scaling event, users lose session data. How can the company make the application resilient without modifying the application code?
⚠ Common exam trap
The trap is assuming that sticky sessions (session affinity) provide resilience by routing users to the same instance. However, sticky sessions do not prevent data loss when that instance is terminated during scale-in events.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use Elastic Block Store (EBS) volumes instead of instance store.
Using EBS volumes instead of instance store provides persistent storage that survives instance termination. By attaching an EBS volume to the EC2 instances and configuring the application to store state on that volume (e.g., through the same file path), the data is preserved even when instances are scaled in. This does not require modifying application code, only infrastructure configuration. Option A is incorrect because reducing the cooldown period does not prevent data loss; it only affects scaling speed. Option B is incorrect because sticky sessions route users to the same instance but do not preserve session data when that instance is terminated during scale-in. Option C is incorrect because larger instances reduce the frequency of scaling events but data loss still occurs when instances are terminated.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Reduce the Auto Scaling group cooldown period.
Why it's wrong here
An Auto Scaling cooldown period is a timer that prevents new scaling activities from starting until the cooldown expires, and it has no effect on storage durability. Reducing the cooldown makes the ASG react more quickly to demand changes, but when scale-in terminates an instance, all data on the local instance store is still discarded. This change does not address the underlying data-loss risk and can even increase termination frequency during fluctuating traffic.
- ✗
Enable sticky sessions on the Application Load Balancer.
Why it's wrong here
Sticky sessions (session affinity) on an Application Load Balancer use a cookie to route subsequent requests from the same client to the same target instance, which helps preserve in-memory session state during normal operation. However, if that target instance is terminated during a scale-in event or replaced after a health check failure, the instance store it relied on disappears and the ALB cannot recover the session data. Sticky sessions only influence request routing; they provide no durability or replication for state stored on ephemeral disks.
- ✗
Increase the instance size to reduce scaling events.
Why it's wrong here
Choosing larger instance types gives each instance more CPU and memory so the Auto Scaling group can handle the same workload with fewer nodes, which reduces the number of scaling events under steady traffic. Yet it does not change the fundamental lifecycle of instance store volumes: any termination—whether from manual scale-in, AZ rebalancing, spot interruption, or health check replacement—still destroys all locally stored data. This approach also increases the blast radius of a single instance failure and the per-hour cost, without making the stateful data persistent.
- ✓
Use Elastic Block Store (EBS) volumes instead of instance store.
Why this is correct
EBS volumes are network-attached block storage that exist independently of the EC2 instance lifecycle, so when an instance terminates the volume can be detached and reattached to a replacement instance. Data written to an EBS volume survives Auto Scaling scale-in as long as the volume's DeleteOnTermination attribute is set to false and the application writes to that mount point. This approach makes application state durable across instance replacements without requiring a distributed storage architecture or application code changes, because the application still sees a standard block device.
Go deeper
Related to this question
About these practice questions
Courseiva writes every DOP-C02 question from scratch — 1,298 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DOP-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DOP-C02 exam.