Purging data from DynamoDB

0

I loaded a massive database but now I need to purge the data so I can retest my load process. Currently I am dropping g the table and the-adding it but this takes time. Is the a better way to handle?

Awsdev
質問済み 8ヶ月前258ビュー
1回答
1
承認された回答

The best way to delete data is to utilize the time to live (TTL) feature in dynamoDB. Once enabled at the table level, you specify a field to hold the numeric value to expire the data. This numeric field is the epoch date time. Once this date time is in the past, AWS (within a day or so) will automatically remove this data (at no extra charge). With this in place, you will not need to drop and rebuild the table, but you will need to manage this TTL attribute.

Another option is to use infrastructure as code (such as CDK, CloudFormation templates, etc), to rename this table which will drop and establish a new table.

profile picture
回答済み 8ヶ月前
profile pictureAWS
エキスパート
レビュー済み 8ヶ月前
profile pictureAWS
エキスパート
レビュー済み 8ヶ月前
  • Thank you sir! Ttl is exactly what I needed

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

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

質問に答えるためのガイドライン

関連するコンテンツ