AWS Certified SysOps Administrator – Associate — Question 302

A company deployed a new web application on multiple Amazon EC2 instances behind an Application Load Balancer (ALB). The EC2 instances run in an Auto Scaling group. Users report that they are frequently being prompted to log in.

What should a SysOps administrator do to resolve this issue?

Answer options

Correct answer: B

Explanation

Enabling sticky sessions (session affinity) on the target group ensures that a user's subsequent requests are consistently routed to the same EC2 instance where their session was initiated. Without this, the Application Load Balancer distributes requests across different instances in the Auto Scaling group, causing users to lose their session state and be prompted to log in again. Other solutions like using a Network Load Balancer, a spread placement group, or Amazon CloudFront do not address session persistence across multiple backend instances.