Exam SAP-C02 All QuestionsBrowse all questions from this exam
Question 432

A company uses a mobile app on AWS to run online contests. The company selects a winner at random at the end of each contest. The contests run for variable lengths of time. The company does not need to retain any data from a contest after the contest is finished.

The company uses custom code that is hosted on Amazon EC2 instances to process the contest data and select a winner. The EC2 instances run behind an Application Load Balancer and store contest entries on Amazon RDS DB instances. The company must design a new architecture to reduce the cost of running the contests.

Which solution will meet these requirements MOST cost-effectively?

    Correct Answer: D

    To achieve a cost-effective solution, migrate the storage to Amazon DynamoDB due to its scalability and efficient automatic data expiration when TTL is set on each entry to expire at the end of the contest. Rewrite the code as AWS Lambda functions to execute the necessary operations such as adding/fetching entries and selecting a winner. Since the contests run for variable lengths of time, manually setting the TTL for each contest ensures that the data automatically expires when the contest concludes, avoiding the need to retain or manually delete data and minimizing costs by using resources only when necessary.

Discussion
pangchnOption: A

Vote for A here reason as specified by zouwelaar

zouwelaarOption: A

You are forgetting that the contests run for variable lengths of time. So Lambda and TTL are out.

w3ap0nx

Assuming each contest still has a set time from the start, D is most cost efficient, TTL is set based on each contest time. Lambda is only used to add/fetch entries and select random winner, runtime is minimal. I go with D here

TheCloudGuruuOption: D

Lambda to save cost

nharazOption: D

D is the most cost-effective solution. It leverages DynamoDB for efficient, scalable storage with automatic data expiration via TTL and AWS Lambda for flexible, event-driven processing. This setup minimizes costs by using resources only when needed and automatically scaling to match demand without the need for manual intervention or over-provisioning.

bjexamprepOption: A

The question is looking for “MOST cost-effectively”. I assume DAX + DynamoDB is cheaper than DynamoDB only. Cause DAX should be able to reduce the RCU cost and improve performance. This is an online contest, which means the RCU could be very high. "the contests run for variable lengths of time" means you can't set a fix TTL for the record entry. And even you can have a fix time, the record being submitted 1 min before the deadline will still be kept for the TTL and keep generating cost.

duriselvan

Time To Live (TTL) for DynamoDB is a cost-effective method for deleting items that are no longer relevant. TTL allows you to define a per-item expiration timestamp that indicates when an item is no longer needed. DynamoDB automatically deletes expired items within a few days of their expiration time, without consuming write throughput.

red_pandaOption: A

Correct option is A here. First of all, we don't know how much time the contest will last as per requirements, so fix the TTL it's a mistake. Second point, we can delete the entire table as we didn't the file after the end of the context, so no data to retain. Finally, for web contest, we don't know how much users will be online, and providing a cache layer might be a good solution.

m1xaOption: D

Lambda for choosing a winner (it's a short-term task) and TTL (known before the contest starts) make sense.

titi_rOption: D

D - correct.

tushar321

D. There is no in memory cache requirement here for DAX. So omitting A

career360guruOption: D

Option D

duriselvan

D : https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html

MoghiteOption: D

Option D is the most cost Efficient

vip2Option: A

remove entire DynamoDB and DAX is used for reduce RCU

Training

Should be A. With Variable lengths of time, Lambda is not the right choice.

trungtdOption: D

"the contests run for variable lengths of time" does not mean that those time periods are not known. We do not need a fixed value for TTL but can use Lambda to change timestamp depending on each contest.

9f02c8d

Option D, The option A doesn't fulfill the requirement of cost effectiveness as there is no reason to use DAX