DVA-C02 Development with AWS Services Practice Question
A developer is deploying a web application using AWS Elastic Beanstalk. The application needs to store session state. The developer wants to ensure that session data is not lost if an EC2 instance is terminated. Which solution should the developer implement?
⚠ Common exam trap
Test-takers frequently confuse persistent storage (EBS) with shared, low-latency session storage, failing to recognize that EBS volumes are instance-attached and not designed for cross-instance session sharing, while ElastiCache provides the necessary distributed, in-memory session store.
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
✓
Store session data in an Amazon ElastiCache cluster.
Amazon ElastiCache provides a managed, highly available, and durable in-memory cache that can store session state externally from EC2 instances. By using ElastiCache (e.g., Redis with replication and persistence), session data survives instance termination because it is stored in a separate, resilient service, not on the local instance.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Store session data in an Amazon EBS volume.
Why it's wrong here
Amazon EBS volumes are block storage attached to a single EC2 instance, making them inherently unsuitable for sharing session state across multiple web servers in an auto-scaling group. While data can persist independently of an instance, accessing it from different instances would require complex, high-latency network file system protocols, which is inefficient for frequent session reads and writes. This approach also introduces a single point of failure if the attached instance becomes unavailable or the volume is not properly detached and reattached.
- ✗
Store session data in an Amazon S3 bucket.
Why it's wrong here
Amazon S3 is an object storage service optimized for durable, highly available storage of static or infrequently accessed data, not for the low-latency, high-frequency read/write operations required by dynamic session management. Each interaction with S3 involves network round trips, introducing significant latency that would degrade application performance and user experience. Furthermore, S3's eventual consistency model for some operations makes it unsuitable for maintaining real-time, consistent session state across requests.
- ✗
Store session data in the instance store.
Why it's wrong here
Instance store provides temporary, block-level storage directly on the host machine where an EC2 instance runs. Any data stored on an instance store volume is ephemeral and will be irrevocably lost if the associated EC2 instance is stopped, terminated, or experiences a hardware failure. This makes it completely inappropriate for storing critical session data, as user sessions would be immediately lost whenever instances are recycled or scaled down in an Elastic Beanstalk environment.
- ✓
Store session data in an Amazon ElastiCache cluster.
Why this is correct
Amazon ElastiCache, particularly when configured with Redis, provides a highly scalable, in-memory data store offering extremely low-latency read and write access essential for responsive session management. It supports high availability through replication and automatic failover, ensuring session data persistence and resilience against node failures. This centralized caching layer allows multiple web servers to efficiently share and access session state, enabling stateless application design crucial for scalability and seamless user experience across instances.
Go deeper
Related to this question
About these practice questions
This DVA-C02 question is part of Courseiva's 724-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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 DVA-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 DVA-C02 exam.