CreateTable - Amazon Timestream


The CreateTable operation adds a new table to an existing database in your account. In an AWS account, table names must be at least unique within each Region if they are in the same database. You may have identical table names in the same Region if the tables are in separate databases. While creating the table, you must specify the table name, database name, and the retention properties. Service quotas apply. See code sample for details.

Request Syntax

{ "DatabaseName": "string", "RetentionProperties": { "MagneticStoreRetentionPeriodInDays": number, "MemoryStoreRetentionPeriodInHours": number }, "TableName": "string", "Tags": [ { "Key": "string", "Value": "string" } ] }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.


The name of the Timestream database.

Type: String

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

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

Required: Yes


The duration for which your time series data must be stored in the memory store and the magnetic store.

Type: RetentionProperties object

Required: No


The name of the Timestream table.

Type: String

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

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

Required: Yes


A list of key-value pairs to label the table.

Type: Array of Tag objects

Array Members: Minimum number of 0 items. Maximum number of 200 items.

Required: No

Response Syntax

{ "Table": { "Arn": "string", "CreationTime": number, "DatabaseName": "string", "LastUpdatedTime": number, "RetentionProperties": { "MagneticStoreRetentionPeriodInDays": number, "MemoryStoreRetentionPeriodInHours": number }, "TableName": "string", "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.


The newly created Timestream table.

Type: Table object


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


You are not authorized to perform this action.

HTTP Status Code: 400


Timestream was unable to process this request because it contains resource that already exists.

HTTP Status Code: 400


Timestream was unable to fully process this request because of an internal server error.

HTTP Status Code: 500


The requested endpoint was invalid.

HTTP Status Code: 400


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

HTTP Status Code: 400


Instance quota of resource exceeded for this account.

HTTP Status Code: 400


Too many requests were made by a user exceeding service quotas. The request was throttled.

HTTP Status Code: 400


Invalid or malformed request.

HTTP Status Code: 400

See Also

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