QuestionQ77

Data Store Management

A company requires a solution to manage costs for an existing Amazon DynamoDB table. The company must also control the table's size. The solution must not interrupt any ongoing read or write operations. The company wants to use a solution that automatically removes data from the table after 1 month.

Which solution meets these requirements with the LEAST ongoing maintenance?

  • A Use the DynamoDB TTL feature to automatically expire data based on timestamps.
  • B Configure a scheduled Amazon EventBridge rule to invoke an AWS Lambda function to check for data that is older than 1 month. Configure the Lambda function to delete old data.
  • C Configure a stream on the DynamoDB table to invoke an AWS Lambda function. Configure the Lambda function to delete data in the table that is older than 1 month.
  • D Use an AWS Lambda function to periodically scan the DynamoDB table for data that is older than 1 month. Configure the Lambda function to delete old data.
Explanation

Amazon DynamoDB Time to Live (TTL) uses a per-item Unix-epoch expiration timestamp and automatically deletes expired items in the background without consuming write throughput. Setting each item's expiration timestamp to one month provides automatic data aging, reduces storage costs and table size, and avoids maintaining scheduled scans, streams, or Lambda cleanup code. TTL deletion is asynchronous and typically occurs within a few days after the expiration time.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!