
Answer-first summary for fast verification
Answer: Transition contest entry storage to Amazon DynamoDB, rewrite the code as AWS Lambda functions, and set the DynamoDB TTL attribute to automatically expire entries at the end of each contest.
Option D is the most cost-effective solution because it leverages Amazon DynamoDB, which is a fully managed NoSQL database that scales automatically and decreases administrative overhead. Using AWS Lambda functions to run the code eliminates the need for managing servers, which reduces operational costs. Additionally, by setting the DynamoDB Time To Live (TTL) attribute, contest entries will automatically expire, ensuring that data is not retained longer than necessary and further reducing costs. This solution provides both an efficient architecture and cost savings.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
A company operates a mobile app on AWS for hosting online contests where winners are randomly selected at the end of each contest. These contests vary in duration, and no data needs to be retained once a contest concludes. The company currently uses custom code on Amazon EC2 instances behind an Application Load Balancer to process contest data and determine winners, with contest entries stored on Amazon RDS DB instances. To minimize costs, the company seeks a new architecture design. Which of the following solutions offers the most cost-effective approach?
A
Migrate contest entry storage to Amazon DynamoDB, establish a DynamoDB Accelerator (DAX) cluster, and refactor the code to operate as Amazon Elastic Container Service (Amazon ECS) containers using the Fargate launch type. Upon contest completion, the DynamoDB table should be deleted.
B
Shift contest entry storage to Amazon Redshift, rewrite the code as AWS Lambda functions, and delete the Redshift cluster after the contest ends.
C
Introduce an Amazon ElastiCache for Redis cluster in front of the RDS DB instances to cache contest entries, refactor the code to run as Amazon Elastic Container Service (Amazon ECS) containers using the Fargate launch type, and set the ElastiCache TTL attribute to expire entries at the end of each contest.
D
Transition contest entry storage to Amazon DynamoDB, rewrite the code as AWS Lambda functions, and set the DynamoDB TTL attribute to automatically expire entries at the end of each contest.