Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/anomalyco/sst/llms.txt

Use this file to discover all available pages before exploring further.

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" }]
  }
});