‹ All DEA-C01 questions

DEA-C01 Practice Question 34: DynamoDB TTL Expiry

AWS Certified Data Engineer – Associate (DEA-C01) · Test 4 · question 4 of 10

Data Store Managementeasy

An Amazon DynamoDB table stores device telemetry events. Only the last 30 days of events are ever read; older items are dead weight, and the table's storage bill grows every month. The team wants expired items removed automatically, without consuming provisioned write capacity and without running a maintenance job.

Which approach should they use?

Select one answer
Show answer and explanation

Answer:

  • A. Enable Time to Live on the table and have the writer store an expiration timestamp, as Unix epoch time in seconds, in the designated TTL attribute

TTL is described as "a cost-effective method for deleting items that are no longer relevant." You enable it on the table, nominate an attribute, and store a per-item expiration timestamp in it; "DynamoDB automatically deletes expired items within a few days of their expiration time, without consuming write throughput." That matches all three constraints: automatic, no write capacity consumed, and no job to operate. The timestamp must be a Number in Unix epoch seconds; items whose TTL attribute is another type are simply ignored by the TTL process.

Option B is the manual version and is expensive twice over. A nightly Scan reads the entire table and consumes read capacity, and every delete consumes write capacity, precisely what the requirement rules out, plus there is now a job to monitor.

Option C works but shifts complexity into the application and the operations process. Readers must know which table or tables to query for a given window, cross-month queries span two tables, and a human or automation has to remember to create and drop tables on schedule.

Option D misuses a backup feature and is destructive. A point-in-time restore creates a new table at a past state, which would discard the last 30 days of writes, the only data anyone actually reads, rather than removing old items.

Reference: Using time to live (TTL) in DynamoDB

Practice Test 4 ›

Study guides for DEA-C01