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); } }

Spend less time in the AWS console, use Dynobase.

Try 7-day free trial. No credit card needed.

Product Features

Download
/
Changelog
/
Pricing
/
Member Portal
/
Privacy
/
EULA
/
Twitter
/
Affiliates & Influencers
© 2024 Dynobase
+
Login to the AWS Console less.
Try Dynobase to accelerate your DynamoDB workflow. Start your 7-day free trial today.