DynamoDB items should be deleted automatically after 30 days. What do you use?
Why C is the answer
Time to Live
TTL removes expired items.
In detail
- Time to Live deletes items after a set time.
- Store an expiry timestamp on each item.
Use case
An illustrative scenario, not a real incident.
Session records need removal after 30 days. TTL deletes them, with no cleanup job.
See it in different ways
stateDiagram-v2 [*] --> Standard Standard --> InfrequentAccess: 30 days InfrequentAccess --> Glacier: 90 days Glacier --> Expired: retention ends Expired --> [*]
mindmap
root((Stores))
Redshift
Complex analytics
DynamoDB
Fast key lookups
S3
Data lake
Athena
SQL on S3stateDiagram-v2 state "Active item" as s0 state "Expired" as s1 state "Deleted" as s2 [*] --> s0 s0 --> s1: time passes s1 --> s2 s2 --> [*]
Key point: TTL removes expired items.
Why the other options are wrong
- A. An S3 Lifecycle rule
- Lifecycle rules apply to S3.
- B. A Lambda function run by hand
- A manual run is not automatic.
- D. A daily manual export
- An export does not delete items.

