Skip to content

Cluster

Source: src/AWS/Redshift/Cluster.ts

A provisioned Amazon Redshift data-warehouse cluster.

Clusters take roughly 5-10 minutes to provision and are billed hourly per node while they exist (ra3.large and dc2.large are the smallest node types). For serverless data warehousing see the RedshiftServerless namespace instead. Destroy clusters you are not using.

Single-Node Cluster

const cluster = yield* Redshift.Cluster("Warehouse", {
nodeType: "ra3.large",
numberOfNodes: 1,
masterUsername: "admin",
masterUserPassword: warehousePassword,
dbName: "analytics",
});

Cluster in a VPC Subnet Group

const subnetGroup = yield* Redshift.ClusterSubnetGroup("WarehouseSubnets", {
subnetIds: [subnetA.subnetId, subnetB.subnetId],
});
const cluster = yield* Redshift.Cluster("Warehouse", {
nodeType: "ra3.large",
numberOfNodes: 2,
masterUsername: "admin",
manageMasterPassword: true,
clusterSubnetGroupName: subnetGroup.clusterSubnetGroupName,
publiclyAccessible: false,
encrypted: true,
});