dynobase-icon
Dynobase

Delete Table in DynamoDB Using Java (Guide w/ Code Examples)

Rafal Wilinski

Provided by Rafal Wilinski

To delete a DynamoDB table, you can use the DeleteTableRequest class.

You can provide the name of the table you wish to delete when using this class.

import software.amazon.awssdk.services.dynamodb.DynamoDbClient; import software.amazon.awssdk.services.dynamodb.model.DeleteTableRequest; import software.amazon.awssdk.services.dynamodb.model.DeleteTableResponse; public class DeleteTableExample { public static void main(String[] args) { DynamoDbClient ddb = DynamoDbClient.create(); String tableName = "my-table"; DeleteTableRequest request = DeleteTableRequest.builder() .tableName(tableName) .build(); DeleteTableResponse response = ddb.deleteTable(request); System.out.println("Table deleted : " + tableName); } }

Dynobase is a Professional GUI Client for DynamoDB

Try 7-day free trial. No strings attached.

Product Features

Download
/
Changelog
/
Pricing
/
Member Portal
/
Privacy
/
EULA
/
Twitter
© 2024 Dynobase
+
Tired of AWS Console?
Try Dynobase to accelerate your DynamoDB workflow. Start your 7-day free trial today.