Deletion from amazon dynamodb
DynamoDBMapper will do the job in few lines :
AWSCredentials credentials = new PropertiesCredentials(credentialFile);
client = new AmazonDynamoDBClient(credentials);
DynamoDBMapper mapper = new DynamoDBMapper(this.client);
DynamoDBScanExpression scanExpression = new DynamoDBScanExpression();
PaginatedScanList<LogData> result = mapper.scan(LogData.class, scanExpression);
for (LogData data : result) {
mapper.delete(data);
}
Do the following steps:
- Make delete table request
- In the response you will get the TableDescription
- Using TableDescription create the table again.
For step 1 and 2 click here
for step 3 click here
That's what I do in my application.