A developer is designing a serverless e-commerce application that runs on AWS Lambda and uses Amazon DynamoDB. The developer needs to implement a session state management solution to store user shopping carts externally, and a database caching solution to reduce read latency for popular products.
Which TWO architectural decisions should the developer make to meet these requirements? (Select TWO.)
- Store user session states in Amazon DynamoDB with Time to Live (TTL) enabled to automatically delete expired shopping carts.Cevap
- Enable Amazon DynamoDB Accelerator (DAX) to cache database reads for popular products.Cevap
- CStore user session states in the local memory of the AWS Lambda execution context to persist shopping carts across all user requests.
- DUse AWS Secrets Manager to store and rotate session state data for each user shopping cart.
- EStore user session states in a separate DynamoDB table and perform a Scan operation on every request to find the session record by user ID.
Cevap
The developer should store user session states in Amazon DynamoDB with Time to Live (TTL) enabled, and enable Amazon DynamoDB Accelerator (DAX) to cache database reads for popular products.
Storing user session states in Amazon DynamoDB with TTL enabled allows the application to offload session storage to a highly available, scalable database while letting AWS automatically clean up expired sessions. Enabling DynamoDB Accelerator (DAX) provides an in-memory caching tier directly in front of DynamoDB, reducing read latency for popular products to sub-milliseconds without modifying application logic.
Adım Adım Çözüm
Anahtar Kavram
Selecting appropriate AWS services and features for application caching and session state management.
Tahmini Süre:1m 30s