Amazon DynamoDB
开发人员指南 (API Version 2012-08-10)
AWS 服务或AWS文档中描述的功能,可能因地区/位置而异。请点击 Amazon AWS 入门,可查看中国地区的具体差异

步骤 5:(可选)删除表

删除 Movies 表:

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

    require "aws-sdk" Aws.config.update({ region: "us-west-2", endpoint: "http://localhost:8000" }) dynamodb = Aws::DynamoDB::Client.new params = { table_name: "Movies" } begin result = dynamodb.delete_table(params) puts "Deleted table." rescue Aws::DynamoDB::Errors::ServiceError => error puts "Unable to delete table:" puts "#{error.message}" end
  2. 要运行该程序,请键入以下命令:

    ruby MoviesDeleteTable.rb