Select your cookie preferences

We use essential cookies and similar tools that are necessary to provide our site and services. We use performance cookies to collect anonymous statistics, so we can understand how customers use our site and make improvements. Essential cookies cannot be deactivated, but you can choose “Customize” or “Decline” to decline performance cookies.

If you agree, AWS and approved third parties will also use cookies to provide useful site features, remember your preferences, and display relevant content, including relevant advertising. To accept or decline all non-essential cookies, choose “Accept” or “Decline.” To make more detailed choices, choose “Customize.”

CreateDatabase - Amazon Timestream

CreateDatabase

Creates a new Timestream database. If the AWS KMS key is not specified, the database will be encrypted with a Timestream managed AWS KMS key located in your account. For more information, see AWS managed keys. Service quotas apply. For details, see code sample.

Request Syntax

{ "DatabaseName": "string", "KmsKeyId": "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.

DatabaseName

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

KmsKeyId

The AWS KMS key for the database. If the AWS KMS key is not specified, the database will be encrypted with a Timestream managed AWS KMS key located in your account. For more information, see AWS managed keys.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 2048.

Required: No

Tags

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

{ "Database": { "Arn": "string", "CreationTime": number, "DatabaseName": "string", "KmsKeyId": "string", "LastUpdatedTime": number, "TableCount": number } }

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.

Database

The newly created Timestream database.

Type: Database object

Errors

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

AccessDeniedException

You are not authorized to perform this action.

HTTP Status Code: 400

ConflictException

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

HTTP Status Code: 400

InternalServerException

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

HTTP Status Code: 500

InvalidEndpointException

The requested endpoint was not valid.

HTTP Status Code: 400

InvalidEndpointException

The requested endpoint was not valid.

HTTP Status Code: 400

ServiceQuotaExceededException

The instance quota of resource exceeded for this account.

HTTP Status Code: 400

ThrottlingException

Too many requests were made by a user and they exceeded the service quotas. The request was throttled.

HTTP Status Code: 400

ValidationException

An 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:

PrivacySite termsCookie preferences
© 2025, Amazon Web Services, Inc. or its affiliates. All rights reserved.