Exam SAA-C03 All QuestionsBrowse all questions from this exam
Question 196

A company runs an application on a large fleet of Amazon EC2 instances. The application reads and writes entries into an Amazon DynamoDB table. The size of the DynamoDB table continuously grows, but the application needs only data from the last 30 days. The company needs a solution that minimizes cost and development effort.

Which solution meets these requirements?

    Correct Answer: D

    The best solution is to extend the application to add an attribute with the current timestamp plus 30 days to each new item and configure DynamoDB to use this attribute as the Time to Live (TTL) attribute. This approach leverages DynamoDB's built-in TTL feature, which automatically deletes items past their expiration date without consuming any write throughput. This method is cost-effective, as it avoids additional charges for compute resources or manual deletion processes, and it requires minimal development effort, as the TTL attribute can be added during the normal data entry process.

Discussion
Gil80Option: D

changing my answer to D after researching a bit. The DynamoDB TTL feature allows you to define a per-item timestamp to determine when an item is no longer needed. Shortly after the date and time of the specified timestamp, DynamoDB deletes the item from your table without consuming any write throughput.

Abrar2022

Amazon DynamoDB Time to Live (TTL) allows you to define a per-item timestamp to determine when an item is no longer needed.

awsgeek75Option: D

A and B don't solve anything. Between C and D, C requires more cost due to Lambda executions. D uses the TTL built-in feature so it won't cost extra. Also, D does not require extra development and is a matter of configuration. In old-school developer speak, don't write code if your DBA can do some work!

awsgeek75

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

TariqKipkemeiOption: D

DynamoDB Time to Live was designed to handle this kind of requirement where an item is no longer needed. TTL is provided at no extra cost as a means to reduce stored data volumes by retaining only the items that remain current for your workload’s needs

Guru4CloudOption: D

D. Extend the application to add an attribute that has a value of the current timestamp plus 30 days to each new item that is created in the table. Configure DynamoDB to use the attribute as the TTL attribute. The main reasons are: Using DynamoDB's built-in TTL functionality is the most direct way to handle data expiration. It avoids the complexity of triggers, streams, and lambda functions in option C. Modifying the application code to add the TTL attribute is relatively simple and minimizes operational overhead

cookieMrOption: D

By adding a TTL attribute to the DynamoDB table and setting it to the current timestamp plus 30 days, DynamoDB will automatically delete the items that are older than 30 days. This solution eliminates the need for manual deletion or additional infrastructure components. A. Redeploying the CloudFormation stack every 30 days and deleting the original stack introduces unnecessary complexity and operational overhead. B. Using an EC2 instance with a monitoring application and a script to delete items older than 30 days adds additional infrastructure and maintenance efforts. C. Configuring DynamoDB Streams to invoke a Lambda function to delete items older than 30 days adds complexity and requires additional development and operational effort compared to using the built-in TTL feature of DynamoDB.

NawaffOption: C

I would day C Because D requires extending the application to add the timestamp attribute. Which is by itself a development effort.

HkayneOption: D

D is the correct answer

soufiyaneOption: D

D is the best answer, dynamostreams is not suitable for this use cases

Uzbekistan

Option D is the most suitable solution to meet the company's requirements while minimizing cost and development effort. TTL (Time to Live) Attribute: DynamoDB provides a feature called Time to Live (TTL), which allows you to automatically delete items from a table after a specified period. By adding a TTL attribute to each item with a value of the current timestamp plus 30 days, you can let DynamoDB automatically delete items older than 30 days. This eliminates the need for manual deletion efforts or periodic stack redeployment. Minimal Development Effort Cost-Effective

scar0909Option: D

use ttl

pisica134

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

studynoplayOption: D

C is incorrect because it can take more than 15 minutes to delete the old data. Lambda won't work

KonbOption: D

Clear case for TTL - every object gets deleted after a certain period of time

rushi0611Option: D

Use DynamoDB TTL feature to achieve this..

jdr75Option: D

C is absurd. DynamoDB usually is a RDS with high iops (read/write operations on tables), executing a Lambda function eachtime you insert a item will not be cost-effective.It's much better create such a field the question propose, and manage the delete with a SQL delete sentence: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/SQLtoNoSQL.DeleteData.html

LuckyAroOption: D

Amazon DynamoDB Time to Live (TTL) allows you to define a per-item timestamp to determine when an item is no longer needed. Shortly after the date and time of the specified timestamp, DynamoDB deletes the item from your table without consuming any write throughput. TTL is provided at no extra cost as a means to reduce stored data volumes by retaining only the items that remain current for your workload’s needs. TTL is useful if you store items that lose relevance after a specific time.