A web tier stores user sessions in local memory on each EC2 instance. When Auto Scaling replaces instances, users lose sessions. What change makes the tier properly stateless?
A.Increase instance sizes so instances are replaced less often
Bigger instances don't fix state loss on replacement.
B.Move session state to a shared store such as DynamoDB or ElastiCache
Correct. Externalizing session state decouples it from instance lifetime.
C.Enable sticky sessions on the load balancer permanently
Sticky sessions mask but don't fix the problem — a failed instance still loses its sessions.
D.Disable Auto Scaling
Disabling Auto Scaling removes resilience, not adds it.
Why this answer
Stateless compute — session data in an external store like DynamoDB or ElastiCache — lets any instance serve any request, so replacements and scaling cause no user impact. This is the foundational HA pattern.
Correct answer: B · Last reviewed 2026-10-25
Official AWS references
Practice this interactively
Answer without seeing the solution first in the High Availability practice session.
Practice High Availability