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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠