AWS Certified Database – Specialty — Question 294
A database specialist needs to delete user data and sensor data 1 year after it was loaded in an Amazon DynamoDB table. TTL is enabled on one of the attributes. The database specialist monitors TTL rates on the Amazon CloudWatch metrics for the table and observes that items are not being deleted as expected.
What is the MOST likely reason that the items are not being deleted?
Answer options
- A. The TTL attribute's value is set as a Number data type.
- B. The TTL attribute's value is set as a Binary data type.
- C. The TTL attribute's value is a timestamp in the Unix epoch time format in seconds.
- D. The TTL attribute's value is set with an expiration of 1 year.
Correct answer: B
Explanation
Amazon DynamoDB TTL requires the designated TTL attribute to be configured specifically as a Number (N) data type representing a Unix epoch timestamp in seconds. If the TTL attribute is set to a Binary (B) data type, DynamoDB will not recognize it, preventing the expiration and deletion of the items. Options A and C describe the correct configuration requirements, whereas Option B represents an invalid configuration that stops TTL from functioning.