Amazon DynamoDB
API Reference (API Version 2012-08-10)


Modifies the provisioned throughput settings, global secondary indexes, or DynamoDB Streams settings for a given table.

You can only perform one of the following operations at once:

  • Modify the provisioned throughput settings of the table.

  • Enable or disable Streams on the table.

  • Remove a global secondary index from the table.

  • Create a new global secondary index on the table. Once the index begins backfilling, you can use UpdateTable to perform other operations.

UpdateTable is an asynchronous operation; while it is executing, the table status changes from ACTIVE to UPDATING. While it is UPDATING, you cannot issue another UpdateTable request. When the table returns to the ACTIVE state, the UpdateTable operation is complete.

Request Syntax

{ "AttributeDefinitions": [ { "AttributeName": "string", "AttributeType": "string" } ], "GlobalSecondaryIndexUpdates": [ { "Create": { "IndexName": "string", "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": number } }, "Delete": { "IndexName": "string" }, "Update": { "IndexName": "string", "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": number } } } ], "ProvisionedThroughput": { "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "StreamSpecification": { "StreamEnabled": boolean, "StreamViewType": "string" }, "TableName": "string" }

Request Parameters

The request accepts the following data in JSON format.


In the following list, the required parameters are described first.


The name of the table to be updated.

Type: String

Length Constraints: Minimum length of 3. Maximum length of 255.

Pattern: [a-zA-Z0-9_.-]+

Required: Yes


An array of attributes that describe the key schema for the table and indexes. If you are adding a new global secondary index to the table, AttributeDefinitions must include the key element(s) of the new index.

Type: array of AttributeDefinition objects

Required: No


An array of one or more global secondary indexes for the table. For each index in the array, you can request one action:

  • Create - add a new global secondary index to the table.

  • Update - modify the provisioned throughput settings of an existing global secondary index.

  • Delete - remove a global secondary index from the table.

For more information, see Managing Global Secondary Indexes in the Amazon DynamoDB Developer Guide.

Type: array of GlobalSecondaryIndexUpdate objects

Required: No


The new provisioned throughput settings for the specified table or index.

Type: ProvisionedThroughput object

Required: No


Represents the DynamoDB Streams configuration for the table.


You will receive a ResourceInUseException if you attempt to enable a stream on a table that already has a stream, or if you attempt to disable a stream on a table which does not have a stream.

Type: StreamSpecification object

Required: No

Response Syntax

{ "TableDescription": { "AttributeDefinitions": [ { "AttributeName": "string", "AttributeType": "string" } ], "CreationDateTime": number, "GlobalSecondaryIndexes": [ { "Backfilling": boolean, "IndexArn": "string", "IndexName": "string", "IndexSizeBytes": number, "IndexStatus": "string", "ItemCount": number, "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" }, "ProvisionedThroughput": { "LastDecreaseDateTime": number, "LastIncreaseDateTime": number, "NumberOfDecreasesToday": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number } } ], "ItemCount": number, "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "LatestStreamArn": "string", "LatestStreamLabel": "string", "LocalSecondaryIndexes": [ { "IndexArn": "string", "IndexName": "string", "IndexSizeBytes": number, "ItemCount": number, "KeySchema": [ { "AttributeName": "string", "KeyType": "string" } ], "Projection": { "NonKeyAttributes": [ "string" ], "ProjectionType": "string" } } ], "ProvisionedThroughput": { "LastDecreaseDateTime": number, "LastIncreaseDateTime": number, "NumberOfDecreasesToday": number, "ReadCapacityUnits": number, "WriteCapacityUnits": number }, "StreamSpecification": { "StreamEnabled": boolean, "StreamViewType": "string" }, "TableArn": "string", "TableName": "string", "TableSizeBytes": number, "TableStatus": "string" } }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.


Represents the properties of the table.

Type: TableDescription object


For information about the errors that are common to all actions, see Common Errors.


An error occurred on the server side.

HTTP Status Code: 500


The number of concurrent table requests (cumulative number of tables in the CREATING, DELETING or UPDATING state) exceeds the maximum allowed of 10.

Also, for tables with secondary indexes, only one of those tables can be in the CREATING state at any point in time. Do not attempt to create more than one such table simultaneously.

The total limit of tables in the ACTIVE state is 250.

HTTP Status Code: 400


The operation conflicts with the resource's availability. For example, you attempted to recreate an existing table, or tried to delete a table currently in the CREATING state.

HTTP Status Code: 400


The operation tried to access a nonexistent table or index. The resource might not be specified correctly, or its status might not be ACTIVE.

HTTP Status Code: 400


Modify Provisioned Write Throughput

This example changes both the provisioned read and write throughput of the Thread table to 10 capacity units.

Sample Request

POST / HTTP/1.1 Host: dynamodb.<region>.<domain>; Accept-Encoding: identity Content-Length: <PayloadSizeBytes> User-Agent: <UserAgentString> Content-Type: application/x-amz-json-1.0 Authorization: AWS4-HMAC-SHA256 Credential=<Credential>, SignedHeaders=<Headers>, Signature=<Signature> X-Amz-Date: <Date> X-Amz-Target: DynamoDB_20120810.UpdateTable { "TableName": "Thread", "ProvisionedThroughput": { "ReadCapacityUnits": 10, "WriteCapacityUnits": 10 } }

Sample Response

HTTP/1.1 200 OK x-amzn-RequestId: <RequestId> x-amz-crc32: <Checksum> Content-Type: application/x-amz-json-1.0 Content-Length: <PayloadSizeBytes> Date: <Date> { "TableDescription": { "TableArn": "arn:aws:dynamodb:us-west-2:123456789012:table/Thread", "AttributeDefinitions": [ { "AttributeName": "ForumName", "AttributeType": "S" }, { "AttributeName": "LastPostDateTime", "AttributeType": "S" }, { "AttributeName": "Subject", "AttributeType": "S" } ], "CreationDateTime": 1.363801528686E9, "ItemCount": 0, "KeySchema": [ { "AttributeName": "ForumName", "KeyType": "HASH" }, { "AttributeName": "Subject", "KeyType": "RANGE" } ], "LocalSecondaryIndexes": [ { "IndexName": "LastPostIndex", "IndexSizeBytes": 0, "ItemCount": 0, "KeySchema": [ { "AttributeName": "ForumName", "KeyType": "HASH" }, { "AttributeName": "LastPostDateTime", "KeyType": "RANGE" } ], "Projection": { "ProjectionType": "KEYS_ONLY" } } ], "ProvisionedThroughput": { "LastIncreaseDateTime": 1.363801701282E9, "NumberOfDecreasesToday": 0, "ReadCapacityUnits": 5, "WriteCapacityUnits": 5 }, "TableName": "Thread", "TableSizeBytes": 0, "TableStatus": "UPDATING" } }

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: