Redshift ships the same columnar, massively-parallel engine in two packages. A provisioned cluster is a fixed set of nodes you size, run continuously, and resize by hand. Redshift Serverless hides the nodes behind a base capacity that scales to each query and bills per second. The engine, the SQL, and the Data API are identical - what differs is how you provision capacity and how you pay for it.
This page shows how to create each from the SDK, then gives a decision table for choosing between them.
Create a provisioned cluster and wait for it, then create a serverless namespace and workgroup and wait for that. Both control planes are asynchronous, so the pattern is create-then-poll.
# --- Python (boto3) ---import boto3, time# ---- Provisioned cluster ----rs = boto3.client("redshift", region_name="us-east-1")rs.create_cluster( ClusterIdentifier="analytics-cluster", NodeType="ra3.xlplus", ClusterType="single-node", # single-node omits NumberOfNodes MasterUsername="admin", MasterUserPassword="ChangeMe-123!", DBName="dev", Encrypted=True, PubliclyAccessible=False,)# Poll until the cluster is available (this takes several minutes).while True: c = rs.describe_clusters(ClusterIdentifier="analytics-cluster")["Clusters"][0] if c["ClusterStatus"] == "available": break time.sleep(30)print("cluster endpoint:", c["Endpoint"]["Address"])# ---- Serverless ----sl = boto3.client("redshift-serverless", region_name="us-east-1")sl.create_namespace(namespaceName="analytics-ns", adminUsername="admin", adminUserPassword="ChangeMe-123!", dbName="dev")sl.create_workgroup(workgroupName="analytics-wg", namespaceName="analytics-ns", baseCapacity=8, publiclyAccessible=False)while sl.get_workgroup(workgroupName="analytics-wg")["workgroup"]["status"] != "AVAILABLE": time.sleep(15)print("serverless workgroup ready")
A provisioned cluster is defined by its NodeType and node count. RA3 node types (ra3.xlplus, ra3.4xlarge, ra3.16xlarge) separate compute from managed storage, so you scale compute independently and pay for storage separately - the modern default. DC2 node types (dc2.large, dc2.8xlarge) bundle local SSD storage and suit small, fixed datasets.
ClusterType is single-node (one node, no MPP across nodes, good for dev) or multi-node (a leader node plus NumberOfNodes compute nodes). More nodes means more slices and more parallelism. Key CreateCluster parameters:
Encrypted=True turns on at-rest encryption; add KmsKeyId for a customer-managed key.
IamRoles attaches roles the cluster assumes for COPY, UNLOAD, and Spectrum.
VpcSecurityGroupIds and ClusterSubnetGroupName place it in your VPC.
PubliclyAccessible controls whether it gets a public endpoint.
You pay for the nodes whenever the cluster exists, running queries or not. You resize with resize_cluster (elastic or classic) and can buy reserved nodes for steady load.
Serverless replaces node sizing with two objects. A namespace holds the database, admin credentials, and IAM roles. A workgroup holds the compute: baseCapacity in RPUs (8 to 512, in steps of 8) sets the floor, and Redshift scales above it per query. You pay per second of RPU usage and nothing while idle, which is the whole point for bursty or intermittent workloads. There is no node type to pick and no cluster to resize.
Both run the identical columnar MPP engine and the same PostgreSQL-flavored SQL. Loading (COPY), Spectrum, distribution and sort keys, and the Data API all behave the same. The only code difference at query time is the target: ClusterIdentifier (plus DbUser or SecretArn) for provisioned, WorkgroupName for serverless. That makes it cheap to prototype on serverless and move a steady workload to a provisioned cluster later, or vice versa.
Forgetting NumberOfNodes on multi-node.multi-node requires it. Fix: set NumberOfNodes, or use single-node for a one-node cluster.
Leaving a provisioned cluster running idle. You pay around the clock. Fix: for intermittent use, choose serverless or pause the cluster with pause_cluster.
Expecting one call for serverless. It needs two - namespace then workgroup. Fix: create the namespace first; the workgroup references it by name.
Putting a plaintext password in code.MasterUserPassword in source is a leak. Fix: use ManageMasterPassword=True (provisioned) or a Secrets Manager-managed admin, and store nothing in the repo.
Assuming baseCapacity caps cost. Serverless scales above the base and can bill more under heavy load. Fix: set a usage limit (create_usage_limit / RPU-hours) to bound spend.
Picking DC2 for large or growing data. DC2 storage is local and finite. Fix: use RA3 with managed storage so compute and storage scale separately.
What is the core difference between provisioned and serverless?
Provisioned gives you a fixed set of nodes you size and pay for continuously. Serverless gives you a base RPU capacity that scales per query and bills per second, with nothing charged while idle. The engine and SQL are identical; only capacity sizing and billing differ.
Which SDK clients do I use for each?
Provisioned uses @aws-sdk/client-redshift (boto3 "redshift") with CreateCluster. Serverless uses @aws-sdk/client-redshift-serverless (boto3 "redshift-serverless") with CreateNamespace and CreateWorkgroup. Both query through @aws-sdk/client-redshift-data.
When should I choose serverless?
When load is spiky, intermittent, or hard to predict, or for dev and test environments - anywhere paying only for query time beats paying for idle nodes. It also removes node sizing and resizing from your operational plate.
When is a provisioned cluster the better choice?
For steady, heavy, around-the-clock analytics where you can size nodes to the load and buy reserved capacity for a discount. Predictable high utilization is where fixed nodes are typically cheaper than per-second serverless billing.
What is the difference between single-node and multi-node?
A single-node cluster runs one node with no cross-node parallelism - fine for dev. A multi-node cluster has a leader node plus NumberOfNodes compute nodes, giving more slices and MPP parallelism for larger workloads.
Do I need a namespace and a workgroup, or just one?
Both. The namespace holds storage and identity (database, admin, IAM roles); the workgroup holds compute and network (base RPU capacity, VPC placement). Create the namespace first, then the workgroup that references it.
How do I control serverless cost?
Set the base capacity to a sensible floor and add a usage limit (create_usage_limit) in RPU-hours to cap spend over a period. Serverless scales above the base under load, so a usage limit is the guardrail against surprise bills.
Can I move from one model to the other?
Yes. Because both run the same engine and SQL, you can snapshot a provisioned cluster and restore into serverless (or the reverse), or simply repoint your Data API calls once the data is loaded. Prototyping on serverless and graduating steady load to provisioned is common.