ttl can not be added when using dynamodb-onetable

TTL isn't instant. It’s done in the background and is usually accomplished within 48 hours of the item expiry.

https://aws.amazon.com/premiumsupport/knowledge-center/ttl-dynamodb/


From the DynamoDB documentation:

"Depending on the size and activity level of a table, the actual delete operation of an expired item can vary. Because TTL is meant to be a background process, the nature of the capacity used to expire and delete items via TTL is variable (but free of charge). TTL typically deletes expired items within 48 hours of expiration."