What should a solutions architect do to ensure that the shopping cart data is preserved at all times?
Configure an Application Load Balancer to enable the sticky sessions feature (session affinity) for access to the catalog in Amazon Aurora.
Configure Amazon ElastiCache for Redis to cache catalog data from Amazon DynamoDB and shopping cart data from the user’s session.
Configure Amazon OpenSearch Service to cache catalog data from Amazon DynamoDB and shopping cart data from the user’s session.
Configure an Amazon EC2 instance with Amazon Elastic Block Store (Amazon EBS) storage for the catalog and shopping cart. Configure automated snapshots.
Explanations:
An Application Load Balancer with sticky sessions can ensure that requests from the same user go to the same backend, but it doesn’t address the preservation of shopping cart data across sessions or provide high availability for the shopping cart data. Also, Amazon Aurora is not suitable for session management.
Amazon ElastiCache for Redis is a suitable solution for caching session data like shopping cart contents, providing low-latency access and high availability. It can persist data in case of disconnection and reconnection, ensuring the shopping cart is preserved.
Amazon OpenSearch Service is primarily used for search and analytics, not for session management or caching shopping cart data. It does not provide the necessary capabilities for high-availability, low-latency session persistence.
Using EC2 with EBS for session or catalog data does not provide the required scalability or high availability. EC2 instances are not ideal for session persistence, and automated snapshots are not sufficient to guarantee data availability in case of failure or disconnection.