exam questions

Exam AWS Certified Solutions Architect - Associate SAA-C03 All Questions

View all questions & answers for the AWS Certified Solutions Architect - Associate SAA-C03 exam

Exam AWS Certified Solutions Architect - Associate SAA-C03 topic 1 question 196 discussion

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?

  • A. Use an AWS CloudFormation template to deploy the complete solution. Redeploy the CloudFormation stack every 30 days, and delete the original stack.
  • B. Use an EC2 instance that runs a monitoring application from AWS Marketplace. Configure the monitoring application to use Amazon DynamoDB Streams to store the timestamp when a new item is created in the table. Use a script that runs on the EC2 instance to delete items that have a timestamp that is older than 30 days.
  • C. Configure Amazon DynamoDB Streams to invoke an AWS Lambda function when a new item is created in the table. Configure the Lambda function to delete items in the table that are older than 30 days.
  • 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.
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Gil80
Highly Voted 2 years ago
Selected Answer: 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.
upvoted 42 times
...
1e22522
Most Recent 4 months, 3 weeks ago
Selected Answer: D
Always bet on the TTL
upvoted 2 times
...
Nawaff
5 months, 2 weeks ago
Selected Answer: C
I would day C Because D requires extending the application to add the timestamp attribute. Which is by itself a development effort.
upvoted 1 times
Anthony_Rodrigues
4 months ago
It's to minimize development effort. C is not the correct one because it needs to enable Dynamo Streams and configure them to send to Lambda, then create the Lambda code for deleting items. Besides that, the Lambda is triggered only on new items, and since it's ephemeral, it would have to query items older than 30 days and then delete them. With D, you just need to make two small changes, and it's done—no extra service, no overhead, and no concern about failing to remove.
upvoted 2 times
...
...
Hkayne
8 months ago
Selected Answer: D
D is the correct answer
upvoted 2 times
...
soufiyane
8 months, 2 weeks ago
Selected Answer: D
D is the best answer, dynamostreams is not suitable for this use cases
upvoted 2 times
...
Uzbekistan
8 months, 3 weeks ago
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
upvoted 3 times
...
scar0909
9 months, 2 weeks ago
Selected Answer: D
use ttl
upvoted 2 times
...
awsgeek75
11 months, 3 weeks ago
Selected Answer: 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!
upvoted 3 times
awsgeek75
11 months, 1 week ago
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html
upvoted 2 times
...
...
TariqKipkemei
1 year, 3 months ago
Selected Answer: 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
upvoted 3 times
...
Guru4Cloud
1 year, 4 months ago
Selected Answer: 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
upvoted 3 times
...
cookieMr
1 year, 6 months ago
Selected Answer: 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.
upvoted 3 times
...
pisica134
1 year, 6 months ago
D: https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/TTL.html
upvoted 2 times
...
Abrar2022
1 year, 7 months ago
Amazon DynamoDB Time to Live (TTL) allows you to define a per-item timestamp to determine when an item is no longer needed.
upvoted 4 times
...
studynoplay
1 year, 7 months ago
Selected Answer: D
C is incorrect because it can take more than 15 minutes to delete the old data. Lambda won't work
upvoted 2 times
...
Konb
1 year, 7 months ago
Selected Answer: D
Clear case for TTL - every object gets deleted after a certain period of time
upvoted 2 times
...
rushi0611
1 year, 7 months ago
Selected Answer: D
Use DynamoDB TTL feature to achieve this..
upvoted 2 times
...
jdr75
1 year, 8 months ago
Selected Answer: 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
upvoted 2 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago