A developer is designing a web application that will be deployed across multiple Amazon EC2 instances in an Auto Scaling group. The application requires a shared session state store that is highly available, survives instance terminations, and survives scale-out events. The session data must be retrieved with sub-millisecond or single-digit millisecond latency, and expired sessions must be automatically deleted to prevent unlimited storage growth. Which TWO solutions meet these requirements? (Select TWO.)
- Store session data in Amazon DynamoDB and enable Time to Live (TTL) on a designated epoch timestamp attribute.Answer
- Store session data in Amazon ElastiCache for Redis with replication enabled and configure key expiration.Answer
- CStore session data in Amazon Systems Manager Parameter Store and delete expired sessions using a scheduled AWS Lambda function.
- DStore session data in Amazon DynamoDB and execute a daily AWS Lambda function that performs a Scan operation to delete expired items.
- EStore session data in AWS Secrets Manager and configure automatic rotation of session records using a custom AWS Lambda function.
Answer
Storing session data in Amazon DynamoDB with Time to Live (TTL) enabled, and storing session data in Amazon ElastiCache for Redis with replication and key expiration configured.
The correct solutions are storing session data in Amazon DynamoDB with Time to Live (TTL) enabled, and storing session data in Amazon ElastiCache for Redis with replication and key expiration. DynamoDB provides single-digit millisecond latency and scales automatically, while its TTL feature handles deletion of expired sessions without consuming write capacity. ElastiCache for Redis is an in-memory data store that offers sub-millisecond performance, and using a replicated cluster ensures high availability while natively supporting key expiration.
Step-by-Step Solution
Key Concept
Session State Management and Caching on AWS
Estimated Time:2m 0s