SAP-C02 Practice Question: Accelerate Workload Migration and Modernization
A company is migrating a critical 3-tier application to AWS. The application consists of a web tier, an application tier, and a PostgreSQL database. The web and application tiers are stateless and run on Linux. The company has deployed the web tier on EC2 instances behind an Application Load Balancer (ALB) across two Availability Zones. The application tier is deployed on EC2 instances in an Auto Scaling group across two Availability Zones. The PostgreSQL database is migrated to Amazon RDS for PostgreSQL with Multi-AZ deployment. The application uses sticky sessions (session affinity) to maintain user sessions on the web tier. After migration, users report that they are frequently logged out and lose session data. The web tier logs show that requests are being routed to different web instances. What is the MOST likely cause of this issue?
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
✓
The target group for the web tier does not have sticky sessions (session affinity) enabled
The issue is that users are losing session data because requests are being routed to different web instances. Sticky sessions (session affinity) must be enabled on the target group of the ALB to ensure that all requests from a user's session are sent to the same web instance. Without sticky sessions, the ALB distributes requests across all healthy targets, causing session data to be lost if not shared. Option A is correct because the target group needs sticky sessions enabled. Option B (disable cross-zone load balancing) would not cause this issue; it would affect traffic distribution across AZs but not session persistence. Option C (idle timeout) would cause sessions to expire after a period of inactivity, not immediate logout. Option D (using NLB) is not necessary as ALB supports sticky sessions natively.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The target group for the web tier does not have sticky sessions (session affinity) enabled
Why this is correct
Sticky sessions ensure requests from a user are routed to the same instance; without it, subsequent requests may go to different instances, losing session data.
- ✗
The ALB is configured to disable cross-zone load balancing, causing uneven traffic distribution
Why it's wrong here
Disabling cross-zone load balancing affects traffic distribution but does not cause session loss; sticky sessions would still work within a zone.
- ✗
The idle timeout of the ALB is set too low, causing sessions to expire
Why it's wrong here
Low idle timeout would cause disconnection but not necessarily routing to different instances; users would be logged out even if sticky sessions worked.
- ✗
The web tier should use a Network Load Balancer (NLB) instead of an ALB for sticky sessions
Why it's wrong here
ALB supports sticky sessions; NLB does not support HTTP session affinity based on cookies.
Go deeper
Related to this question
About these practice questions
This SAP-C02 question is part of Courseiva's 1,660-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 SAP-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 SAP-C02 exam.