Skip to content

Database

Source: src/AWS/Timestream/Database.ts

An Amazon Timestream for LiveAnalytics database — the top-level container for time-series Tables.

Database owns the database’s lifecycle and its mutable configuration: the KMS key used for encryption at rest and its tags. A database name is auto-generated from the app, stage, and logical ID unless you provide one.

Basic Database

import * as Timestream from "alchemy/AWS/Timestream";
const database = yield* Timestream.Database("Metrics");

Database with a Customer-Managed KMS Key

const database = yield* Timestream.Database("SecureMetrics", {
kmsKeyId: "alias/my-timestream-key",
tags: { Environment: "production" },
});