Which solution will meet these requirements?
Store the data objects on an Amazon RDS DB instance. Cache the data objects in memory by using Amazon ElastiCache.
Store the data objects on Amazon EC2 instances behind an Application Load Balancer. Use session affinity (sticky sessions) for each user’s shopping cart.
Store the data objects in Amazon S3 buckets. Cache the data objects by using Amazon CloudFront with the maximum TTL.
Store the data objects in Amazon DynamoDB tables. Cache the data objects by using DynamoDB Accelerator (DAX).
Explanations:
Using Amazon RDS requires managing a relational database, which may not automatically scale as efficiently for variable loads as a NoSQL solution like DynamoDB. Additionally, caching with ElastiCache adds complexity and may not address the need for extended storage of shopping cart data as effectively as DynamoDB.
Storing data on EC2 instances behind an Application Load Balancer requires managing server instances, which complicates scalability. This approach lacks the built-in scaling features of serverless architectures and would not effectively handle the variable load required for an e-commerce site.
While Amazon S3 provides durable object storage, it is not optimized for high-frequency retrieval of dynamic data like shopping carts. CloudFront is more suitable for caching static content rather than frequently changing shopping cart data, and it does not provide the same data structure and retrieval capabilities as a database service.
Storing shopping cart data in Amazon DynamoDB provides a highly scalable NoSQL database solution that automatically adjusts to varying loads. The use of DynamoDB Accelerator (DAX) enhances retrieval speeds, making it suitable for frequent access while supporting the long-term storage needs of shopping carts.