Courseiva
Development with AWS ServicesmediumMultiple ChoiceObjective-mapped

DVA-C02 Session State Storage Practice Question

A company runs a web application on Amazon EC2 instances behind an Application Load Balancer (ALB). The application stores session state in an S3 bucket. Users report that after logging in, they are sometimes redirected to the login page again on subsequent requests. What is the MOST likely cause?

⚠ Common exam trap

Candidates may incorrectly attribute the problem to S3's eventual consistency, which was fixed. The real issue is S3's higher latency relative to in-memory services, making it a poor choice for session state.

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

S3 is not a suitable store for session state due to its higher latency compared to in-memory stores like ElastiCache or DynamoDB.

Amazon S3 now provides strong read-after-write consistency, so eventual consistency is not the cause. However, S3's higher latency compared to in-memory stores like ElastiCache or DynamoDB makes it unsuitable for session management, which requires fast, frequent reads and writes. The higher latency can cause delays in session retrieval, leading to timeouts and the login page being displayed again.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • S3 is not a suitable store for session state due to its higher latency compared to in-memory stores like ElastiCache or DynamoDB.

    Why this is correct

    Amazon S3, while highly durable and scalable, is an object storage service optimized for throughput of large objects and cost-effectiveness, not for low-latency, high-frequency access to small, frequently changing data like session state. Its typical latency, even with strong consistency, is significantly higher than in-memory caches like ElastiCache (Redis/Memcached) or specialized NoSQL databases like DynamoDB. This higher latency can cause the application to time out when attempting to retrieve session data, leading to the perception of a lost session and subsequent redirection to the login page.

  • The EC2 instances do not have internet access to reach S3.

    Why it's wrong here

    If the EC2 instances truly lacked internet access, they would be completely unable to communicate with S3, leading to consistent and total failure in retrieving session data. This would manifest as a constant inability to log in or persistent application errors across all users, not intermittent redirection to the login page. The problem describes an intermittent issue, which is inconsistent with a complete lack of network connectivity to a critical service.

  • The ALB does not have sticky sessions enabled.

    Why it's wrong here

    Sticky sessions on an Application Load Balancer (ALB) are designed to route a user's subsequent requests to the same backend EC2 instance. However, when session state is externalized to a shared store like S3, any instance can retrieve the session data regardless of which instance handled the previous request. Therefore, sticky sessions are not required for maintaining session persistence in this architecture, and their absence would not cause intermittent login page redirection.

  • The application is not scaling properly, causing session loss.

    Why it's wrong here

    Improper scaling would only cause session loss if session data was stored directly on the EC2 instances themselves. Since the problem statement indicates session state is externalized to S3, scaling events like instance termination or launch do not directly destroy or create session data. The intermittent redirection to the login page suggests a problem with session retrieval, not a fundamental loss of session data due to scaling actions.

Quick reference

AWS S3 Storage Class Comparison

Storage ClassMin DurationRetrievalUse Case
S3 StandardNoneImmediateFrequently accessed data
S3 Standard-IA30 daysImmediateInfrequent access, rapid retrieval
S3 One Zone-IA30 daysImmediateNon-critical infrequent data
S3 Intelligent-TieringNoneImmediate–hoursUnknown or changing access patterns
S3 Glacier Instant90 daysMillisecondsArchive with instant retrieval
S3 Glacier Flexible90 daysMinutes–hoursArchive, flexible retrieval
S3 Glacier Deep Archive180 daysHoursLong-term compliance archive

About these practice questions

One of 724 original DVA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.