AWS Certified SysOps Administrator – Associate (legacy) — Question 667
A company has a three-tier stateful web application. The application is served through an Amazon CloudFront distribution with default configuration options and an
Application Load Balancer (ALB) as the origin. Logged-in users get intermittently logged out and see inconsistent content.
Which action should the company take to ensure a stable user experience during a session?
Answer options
- A. Enable session affinity (sticky sessions) on the ALB. Configure CloudFront to forward all cookies to the origin.
- B. Restrict viewer access to signed cookies in CloudFront. Enable session affinity (sticky sessions) on the ALB.
- C. Switch from duration-based session affinity (sticky sessions) to application-controlled session affinity (sticky sessions) on the ALB.
- D. Configure the CloudFront TTL to be equal to or less than the ALB session duration.
Correct answer: C
Explanation
Switching to application-controlled session affinity (sticky sessions) on the ALB allows the application to manage session state using its own specific cookies, ensuring consistent routing even when served through CloudFront. Duration-based sticky sessions rely on ALB-generated cookies, which can cause issues if CloudFront does not forward them correctly or if they expire independently of the application state. Managing stickiness at the application level provides the precise control needed to maintain stable sessions for a stateful three-tier application.