Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does AWS Dynamodb TTL Stream fire separate expired versus deleted events?

We want to use AWS Dynamodb Streams to manage a subscription renewal service as outlined in the documentation here https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/time-to-live-ttl-streams.html.

AWS also states that the TTL actual deletion can take up to 48 hours. https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/howitworks-ttl.html

If we set a TTL on a record in Dynamodb for 30 minutes would we get the expired event after 30 minutes or would it be 30 minutes plus up to 48 hours for the actual deletion event?

like image 464
Kenoyer130 Avatar asked Oct 20 '25 04:10

Kenoyer130


1 Answers

There is no "expired event"...

So you'd get the actual delete event at some point within 48 hours of the expiration..

You can tell the delete was done by AWS due to a TTL expiring by looking for

Records[<index>].userIdentity.type  
"Service"

Records[<index>].userIdentity.principalId  
"dynamodb.amazonaws.com"
like image 146
Charles Avatar answered Oct 21 '25 18:10

Charles