Menu
Amazon DynamoDB
API Reference

CreateGlobalTable

Creates a global table from an existing table. A global table creates a replication relationship between two or more DynamoDB tables with the same table name in the provided regions.

Tables can only be added as the replicas of a global table group under the following conditions:

  • The tables must have the same name.

  • The tables must contain no items.

  • The tables must have the same hash key and sort key (if present).

  • The tables must have DynamoDB Streams enabled (NEW_AND_OLD_IMAGES).

Request Syntax

{
   "GlobalTableName": "string",
   "ReplicationGroup": [ 
      { 
         "RegionName": "string"
      }
   ]
}

Request Parameters

The request accepts the following data in JSON format.

Note

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

GlobalTableName

The global table name.

Type: String

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

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

Required: Yes

ReplicationGroup

The regions where the global table needs to be created.

Type: Array of Replica objects

Required: Yes

Response Syntax

{
   "GlobalTableDescription": { 
      "CreationDateTime": number,
      "GlobalTableArn": "string",
      "GlobalTableName": "string",
      "GlobalTableStatus": "string",
      "ReplicationGroup": [ 
         { 
            "RegionName": "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.

GlobalTableDescription

Contains the details of the global table.

Type: GlobalTableDescription object

Errors

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

GlobalTableAlreadyExistsException

The specified global table already exists.

HTTP Status Code: 400

InternalServerError

An error occurred on the server side.

HTTP Status Code: 500

LimitExceededException

Up to 50 CreateBackup operations are allowed per second, per account. There is no limit to the number of daily on-demand backups that can be taken.

Up to 10 simultaneous table operations are allowed per account. These operations include CreateTable, UpdateTable, DeleteTable,UpdateTimeToLive, and RestoreTableFromBackup.

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.

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

TableNotFoundException

A table with the name TableName does not currently exist within the subscriber's account.

HTTP Status Code: 400

See Also

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