Amazon DynamoDB
开发人员指南 (API Version 2012-08-10)
AWS 服务或AWS文档中描述的功能,可能因地区/位置而异。点 击 Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

步骤 5:(可选) 删除表

删除 Movies 表:

  1. 将以下程序复制并粘贴到名为 MoviesDeleteTable.js 的文件中:

    var AWS = require("aws-sdk"); AWS.config.update({ region: "us-west-2", endpoint: "http://localhost:8000" }); var dynamodb = new AWS.DynamoDB(); var params = { TableName : "Movies" }; dynamodb.deleteTable(params, function(err, data) { if (err) { console.error("Unable to delete table. Error JSON:", JSON.stringify(err, null, 2)); } else { console.log("Deleted table. Table description JSON:", JSON.stringify(data, null, 2)); } });
  2. 要运行该程序,请键入以下命令:

    node MoviesDeleteTable.js