您可以使用aws cli删除所有表,可能只删除一个表。
aws dynamodb list-tables --profile your_profile | jq .'TableNames[]' -r | grep -v table_you_dont_want_to_delete | xargs -ITABLE -n 1 aws dynamodb delete-table --table-name TABLE --profile your_profile
Run Code Online (Sandbox Code Playgroud)
小智 5
您可以使用以下代码删除表。
var params = {
TableName: 'table-name',
};
dynamodb.deleteTable(params, function(err, data) {
if (err) ppJson(err); // an error occurred
else ppJson(data); // successful response
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5646 次 |
| 最近记录: |