AWS Certified Developer – Associate — Question 139

A developer is writing a web application that allows users to sign in. The application will run on Amazon EC2 instances behind an Application Load Balancer (ALB). The instances will run in an Auto Scaling group across multiple Availability Zones.

How can the developer ensure that users stay signed in when the Auto Scaling group is scaled down?

Answer options

Correct answer: B

Explanation

The correct answer is B because using Amazon DynamoDB allows for centralized and persistent storage of session states, ensuring that users remain signed in even if instances are scaled down. Options A and D address session management on the ALB level but do not provide a solution for session persistence across instance terminations. Option C, while it suggests using EBS for storage, is not feasible since EBS volumes cannot be shared among multiple instances in a way that maintains session state effectively.