Skip to main content
The Cluster component lets you create an Amazon ECS cluster for running containerized services.

Constructor

sst.config.ts
const cluster = new sst.aws.Cluster("MyCluster", {
  vpc
});

Parameters

vpc

vpc
Vpc
required
The VPC to place the cluster in.
{
  vpc: myVpc
}

Properties

name

arn

nodes

Examples

Create a cluster

sst.config.ts
const vpc = new sst.aws.Vpc("MyVpc");
const cluster = new sst.aws.Cluster("MyCluster", { vpc });

Add a service

sst.config.ts
cluster.addService("MyService", {
  loadBalancer: {
    ports: [{ listen: "80/http" }]
  }
});

Build docs developers (and LLMs) love