A developer is designing a web application and wants to store user session states externally to make the application tier completely stateless. The session store must support high availability, scale horizontally, and allow fast key-value lookups. Which TWO of the following configurations should the developer implement? (Select TWO.)
- Store session states in Amazon DynamoDB using the user ID as the partition key, and retrieve sessions using Query operations.Answer
- Store session states in Amazon ElastiCache for Redis configured with multi-AZ replication.Answer
- CStore session states in AWS Secrets Manager and enable automatic rotation to manage session expiration.
- DStore session states in Amazon DynamoDB and use periodic Scan operations to retrieve specific session records.
- EStore session states in local Lambda execution context variables to persist data across all concurrent users.
Answer
Store session states in Amazon DynamoDB using the user ID as the partition key, and retrieve sessions using Query operations; and store session states in Amazon ElastiCache for Redis configured with multi-AZ replication.
The correct configurations involve using Amazon DynamoDB with a partition key Query lookup, which scales horizontally and provides low-latency key-value access, and Amazon ElastiCache for Redis with multi-AZ replication, which provides sub-millisecond latency and automatic failover for high availability.
Step-by-Step Solution
Key Concept
Decoupling application state using highly available, low-latency external data stores such as Amazon DynamoDB or Amazon ElastiCache.