Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DynamoDB TTL - when Items are removed

Does dynanodb has a limitation taking upto 48 hours to delete expired rows ? http://docs.aws.amazon.com/amazondynamodb/latest/developerguide/howitworks-ttl.html

Since I want to execute a Lambda when a row is deleted from dynamo db table, so that means my lambda trigger can take upto 48 hours ?

like image 493
user1846749 Avatar asked Jul 20 '17 02:07

user1846749


People also ask

How long does Dynamo TTL take?

Enabling, disabling, or changing TTL settings on a table can take approximately one hour for the settings to propagate and to allow the execution of any further TTL related actions.

Which feature in DynamoDB allows you to automatically delete expired items from the table?

TTL typically deletes expired items within 48 hours of expiration. Items that have expired, but haven't yet been deleted by TTL, still appear in reads, queries, and scans. If you do not want expired items in the result set, you must filter them out.

Can you update TTL in DynamoDB?

Sign in to the AWS Management Console and open the DynamoDB console at https://console.aws.amazon.com/dynamodb/ . Choose Tables, and then choose the table that you want to modify. In the Additional settings tab, in the Time to Live (TTL) section, choose Enable.

How long does DynamoDB take to delete?

When you delete a table, any indexes on that table are also deleted. If you have DynamoDB Streams enabled on the table, then the corresponding stream on that table goes into the DISABLED state, and the stream is automatically deleted after 24 hours. Use the DescribeTable action to check the status of the table.


2 Answers

Yes according to the link you sent.

DynamoDB typically deletes expired items within 48 hours of expiration. The exact duration within which an item truly gets deleted after expiration is specific to the nature of the workload and the size of the table. Items that have expired and not been deleted will still show up in reads, queries, and scans.

If you have a Lambda trigger on delete it will happen on delete which could be within 48 hours of expiration (according to the link you sent).

like image 182
Charlie Fish Avatar answered Oct 09 '22 03:10

Charlie Fish


Commonly takes 24 - 48 hours to be deleted, but keep in mind those items with expired TTL could still appearing in queries and scans. To avoid "phantom reads" you can use a Filter Expression to check if the TTL value is greater than current date.

More info in the docs.

like image 20
Diego Rojas Avatar answered Oct 09 '22 03:10

Diego Rojas