Q67 — AWS DOP-C02 Ch.2

Question 67 of 100 | ← Chapter 2

A company is testing a web application running on Amazon EC2 instances behind an Application Load Balancer. Instances run in an Auto Scaling group spanning multiple Availability Zones. During new software deployments, the company uses blue/green deployment to avoid unhealthy instances.

Correct Answer: D. Modify the application to store user session information in an Amazon ElastiCache cluster.

Explanation

User session persistence across scaling events and deployments requires centralized, low-latency, highly available session storage. Amazon ElastiCache (Redis or Memcached) is purpose-built for this use case: it provides sub-millisecond read/write latency, automatic failover, and seamless sharing across all application instances. Option A (sticky sessions) fails when instances are replaced during scaling or deployment. Option B misrepresents ALB functionality—ALB does not support native 'session sharing'. Option C (S3) incurs high latency and is unsuitable for frequent session reads/writes. Option D aligns with AWS best practices for stateful web applications.