スキップしてコンテンツを表示

Max TTL for DynamoDB

0

Hi DynamoDB Team,

I am working on setting up a TTL for an DynamoDB Table that holds important information for accounting purposes. The recommended approach is to implement a TTL set for 10 years when creating the entries. I am curious whether there is a max epoch time value that we can put for this TTL. I would assume there is not but I just want to double check.

Thanks, Matt

質問済み 1年前812ビュー

2回答
2

There is no maximum time in the future that you can use as a TTL value, however there is a limit that it can't be more than 5 years in the past.

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/time-to-live-ttl-before-you-start.html

AWS
エキスパート

回答済み 1年前

0

For DynamoDB's Time To Live (TTL) feature, there is a limitation on how far in the past the TTL value can be, but there isn't a specific maximum limit mentioned for future expiration dates. According to the documentation, the TTL can't be more than five years in the past to be considered for expiry and deletion.

The TTL value must be stored in Unix epoch time format (in seconds). For example, if you set the expiration date to a specific future time like August 21st, 2024, the item will be expired after that specified time.

For your accounting data that needs to be retained for 10 years, you can set the TTL attribute to a timestamp that is 10 years in the future from when the item is created. This approach is valid and commonly used - you would calculate the expiration time by adding the desired retention period (in this case, 10 years) to the creation timestamp.

Keep in mind that TTL deletions are asynchronous and can take up to 48 hours or more after the expiration time for the actual deletion to occur. The TTL process runs roughly every six hours, but there's no guarantee on exact timing of deletions.
Sources
Computing time to live (TTL) in DynamoDB - Amazon DynamoDB
Data modeling building blocks in DynamoDB - Amazon DynamoDB
Using time to live (TTL) in DynamoDB - Amazon DynamoDB

回答済み 1年前

エキスパート

レビュー済み 1年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

関連するコンテンツ