Session State Storage Options: DynamoDB and ElastiCache Redis
A company wants to store session state for a web application that runs on Amazon EC2 instances behind an Application Load Balancer. The session data is ephemeral and must be highly available. Which two AWS services are suitable for this use case? (Choose two.)
Quick Answer
The correct answers are Amazon ElastiCache for Redis with replication and DynamoDB. ElastiCache for Redis is ideal because it provides sub-millisecond latency in-memory storage, and enabling replication ensures high availability by maintaining copies of the session data across multiple nodes, which is critical for ephemeral session state that must survive individual node failures. DynamoDB is also suitable because it is a fully managed, highly available key-value store with single-digit millisecond performance, making it a durable and scalable option for session state without the overhead of managing servers. On the AWS Certified Database Specialty DBS-C01 exam, this scenario tests your ability to distinguish between low-latency, ephemeral storage services and relational or data warehouse solutions; a common trap is selecting Amazon RDS or S3, but RDS is optimized for structured relational data and S3 lacks the low-latency access required for session lookups. Memory tip: think “session state needs speed and survival” — Redis for speed with replication, DynamoDB for survival with built-in HA.
⚠ Common exam trap
Candidates often choose Amazon S3 for its durability and low cost, overlooking its eventual consistency model and higher latency, which are unsuitable for real-time session state; or they pick Amazon RDS for MySQL assuming relational databases are always the safest choice, ignoring the overhead and lack of native TTL/expiration features for ephemeral data.
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
✓
Amazon DynamoDB
Amazon DynamoDB is a fully managed, serverless NoSQL key-value and document database that offers single-digit millisecond latency at any scale. It is ideal for storing ephemeral session state because it provides built-in high availability and durability by replicating data across multiple Availability Zones (AZs) automatically, without requiring manual failover or replication configuration.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Amazon DynamoDB
Why this is correct
Fast, scalable, and highly available key-value store.
- ✓
Amazon ElastiCache for Redis with replication
Why this is correct
In-memory, low-latency, and highly available.
- ✗
Amazon Redshift
Why it's wrong here
Data warehouse, not for session state.
- ✗
Amazon S3
Why it's wrong here
Object storage with higher latency.
- ✗
Amazon RDS for MySQL
Why it's wrong here
Not optimized for ephemeral session data.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
About these practice questions
This DBS-C01 question is part of Courseiva's 1,663-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 →
Same concept, more angles
2 more ways this is tested on DBS-C01
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A company needs a database for a serverless web application that stores user sessions. The sessions expire after 24 hours. The database must be highly available and require no server management. Which AWS service is most appropriate?
easy- A.Amazon ElastiCache for Redis with cluster mode.
- ✓ B.Amazon DynamoDB with TTL.
- C.Amazon RDS for PostgreSQL with Multi-AZ.
- D.Amazon S3 with lifecycle policies.
Why B: Amazon DynamoDB with TTL is the most appropriate choice because it provides a fully managed, serverless, highly available NoSQL database that can automatically expire user sessions after 24 hours using the Time to Live (TTL) feature. DynamoDB's on-demand capacity mode eliminates server management, and its built-in replication across multiple Availability Zones ensures high availability without any manual intervention.
Variation 2. A company needs to store session state for a web application that runs on Amazon EC2 instances behind an Application Load Balancer. The session data is small (less than 1 KB per user) and must be highly available with low latency. Which AWS database service is best for this use case?
easy- A.Amazon S3
- ✓ B.Amazon ElastiCache for Redis
- C.Amazon DynamoDB
- D.Amazon RDS for MySQL
Why B: Amazon ElastiCache for Redis is the best choice because it provides an in-memory data store with sub-millisecond latency, ideal for storing small session state data (less than 1 KB per user). Redis supports key-value operations with built-in data expiration (TTL), making it perfect for session management. Its replication and automatic failover capabilities ensure high availability, meeting the application's requirements.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DBS-C01 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 DBS-C01 exam.