A company runs online contests via a mobile app on AWS, selecting a random winner at contest end. Contest durations vary and no contest data must be retained after a contest ends. Currently the company uses custom code on Amazon EC2 instances behind an Application Load Balancer, storing contest entries in Amazon RDS. The company wants a new architecture that reduces contest costs. Which solution is the most cost-effective while meeting the requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Store contest entries in Amazon DynamoDB. Rewrite the processing code as AWS Lambda functions. Use DynamoDB TTL on entries so they automatically expire at contest end..
Why this is the answer
The correct solution leverages serverless services for cost-effectiveness and automatic data lifecycle management. Amazon DynamoDB is a cost-effective NoSQL database that scales on demand, and its Time To Live (TTL) feature automatically deletes items after a specified time, perfectly meeting the requirement to not retain contest data after a contest ends. AWS Lambda functions are serverless compute, meaning you only pay for the compute time consumed, significantly reducing costs compared to always-on EC2 instances, especially for variable workloads like contests. Moving contest-entry storage to Amazon DynamoDB with DAX and ECS Fargate is less cost-effective than Lambda for compute and DAX adds complexity and cost that DynamoDB alone might handle for this use case. Migrating to Amazon Redshift is not suitable as Redshift is a data warehouse designed for analytical queries on large datasets, not transactional contest entries, and deleting the cluster after each contest is inefficient and costly. Adding ElastiCache for Redis in front of RDS still incurs RDS costs and adds another layer of complexity and cost, while Lambda and DynamoDB offer a more integrated serverless solution.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed