We have a requirement to delete DynamoDB items that are 3 days old so I tried default AWS CLI update query but the query doesn't take input value for TTL.
As per documentation, I'm following the below query to activate DynamoDB TTL (Time to Live) however when it is activated it defaults to one hour however I want a query that will take 3 days as the TTL value. How can I write the correct query? We are creating a script deployment so we won't be doing via UI console.
aws dynamodb update-time-to-live \
--table-name MusicCollection \
--time-to-live-specification Enabled=true,AttributeName=ttl
As shown in below image, items are not deleted passed the current time, I guess it deletes after an hour.