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 (Amazon Elasticsearch 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:
While enabling sticky sessions can help maintain user session data, it does not ensure that shopping cart data is preserved if a user disconnects and reconnects. It also doesn’t provide a highly available data store for the cart data, making it insufficient for the requirements.
Amazon ElastiCache for Redis provides a caching solution that can persist user session data, making it highly available even if a user disconnects and reconnects. It also offers low-latency access to both catalog and shopping cart data, fulfilling the application’s need for quick data retrieval while ensuring data persistence.
Amazon OpenSearch Service is primarily used for search and analytics rather than session management or caching shopping cart data. It does not provide the necessary persistence and low-latency requirements for user sessions as effectively as ElastiCache for Redis.
While using an EC2 instance with EBS storage can provide a way to store data, it lacks scalability and high availability compared to managed services like ElastiCache or DynamoDB. Additionally, if the instance fails or if the user disconnects, data preservation would not be guaranteed without additional complexity in backup and recovery processes.