
Answer-first summary for fast verification
Answer: Use Amazon ElastiCache to manage and store session data.
## Explanation **Correct Answer: A - Use Amazon ElastiCache to manage and store session data.** ### Why this is correct: 1. **Distributed Session Management Requirement**: When EC2 instances scale up and down frequently across multiple Availability Zones, session data needs to be stored externally so that any instance can access it. Amazon ElastiCache (Redis or Memcached) provides an in-memory data store that can be used to store session data centrally. 2. **Code Changes are Acceptable**: The question states "The company is willing to make changes to code if needed." This indicates that modifying the application to store session data in an external cache like ElastiCache is feasible. 3. **Scalability and Availability**: ElastiCache provides high availability, automatic failover, and can scale to handle the session data requirements of a dynamically scaling application. ### Why other options are incorrect: **B. Use session affinity (sticky sessions) of the ALB to manage session data.** - Sticky sessions route subsequent requests from the same client to the same target instance. However, this approach doesn't work well with auto-scaling because: - When instances scale down, session data is lost - It doesn't provide true distributed session management - It reduces the effectiveness of load balancing **C. Use Session Manager from AWS Systems Manager to manage the session.** - AWS Systems Manager Session Manager is used for secure shell access to EC2 instances, not for application session management. It's completely unrelated to web application session data. **D. Use the GetSessionToken API operation in AWS Security Token Service (AWS STS) to manage the session.** - AWS STS GetSessionToken is used for obtaining temporary security credentials for IAM users or federated users, not for managing web application session data. ### Key Architecture Considerations: 1. **Session Data Persistence**: With auto-scaling, instances can be terminated at any time. External session storage ensures session data survives instance termination. 2. **Multi-AZ Deployment**: ElastiCache can be deployed across multiple Availability Zones for high availability. 3. **Performance**: In-memory caching provides low-latency access to session data. 4. **Implementation**: The application code would need to be modified to store session data in ElastiCache instead of local instance memory.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A solutions architect is designing the architecture of a new application being deployed to the AWS Cloud. The application will run on Amazon EC2 On-Demand Instances and will automatically scale across multiple Availability Zones. The EC2 instances will scale up and down frequently throughout the day. An Application Load Balancer (ALB) will handle the load distribution. The architecture needs to support distributed session data management. The company is willing to make changes to code if needed.
What should the solutions architect do to ensure that the architecture supports distributed session data management?
A
Use Amazon ElastiCache to manage and store session data.
B
Use session affinity (sticky sessions) of the ALB to manage session data.
C
Use Session Manager from AWS Systems Manager to manage the session.
D
Use the GetSessionToken API operation in AWS Security Token Service (AWS STS) to manage the session.