Home > OS >  How to truncate dynamodb DB table via cli?
How to truncate dynamodb DB table via cli?

Time:11-01

DynamoDB tables can be truncated via AWS console, but I'd like to do this in a script. All the answers I saw on S.O. regarding this topic involved 'scans' and similar stuff that I didn't completely understand. I'm wondering if there is a simple directive that I can use to accomplish this truncation. Thanks !

CodePudding user response:

You can’t. You need to delete the table. What all the scripts are doing is scanning the entire table and delete each item. Better to delete the table and create it with the same name

CodePudding user response:

Use dynamodbdump

its fast and simple

https://github.com/mifi/dynamodump

  • Related