Database Reference
In-Depth Information
This creates a table on DynamoDB and can be used to store data once active.
Update table
Updating a table in DynamoDB is quite easy; you just need to specify the table name and
the specifications that need to be updated. DynamoDB allows us to only update provision
throughput configurations and the global secondary index. The following is an example of
this:
$tableName = "Book";
$dynamodbclient->updateTable(array(
"TableName" => $tableName,
"ProvisionedThroughput" => array(
"ReadCapacityUnits" => 30,
"WriteCapacityUnits" => 30
)
));
Here we are updating the read and write capacity units to 30 for the table Book .
Delete table
Deleting a table in DynamoDB is quite easy; you just need to mention the name of the
table to be deleted and invoke the deleteTable method. You should be careful while
using this API as a table, once deleted, cannot be retrieved back.
$tableName = "Book";
$result = $dynamodbclient->deleteTable(array(
"TableName" => $tableName
));
List tables
The DynamoDB SDK allows us to list down all available tables for a given account by in-
voking the listtable method from the DynamoDB client. You can optionally mention
whether you want to limit the result to a specific number. You can also mention whether
Search WWH ::




Custom Search