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.php 的文件中。

    Copy
    <?php require 'vendor/autoload.php'; date_default_timezone_set('UTC'); use Aws\DynamoDb\Exception\DynamoDbException; $sdk = new Aws\Sdk([ 'endpoint' => 'http://localhost:8000', 'region' => 'us-west-2', 'version' => 'latest' ]); $dynamodb = $sdk->createDynamoDb(); $params = [ 'TableName' => 'Movies' ]; try { $result = $dynamodb->deleteTable($params); echo "Deleted table.\n"; } catch (DynamoDbException $e) { echo "Unable to delete table:\n"; echo $e->getMessage() . "\n"; } ?>
  2. 键入以下命令以运行程序:

    php MoviesDeleteTable.php