Skip to content
GitHub Discord

AWS Cluster private service

Adds a private load balancer to a service by setting the loadBalancer.public prop to false.

This allows you to create internal services that can only be accessed inside a VPC.

sst.config.ts
const vpc = new sst.aws.Vpc("MyVpc", { bastion: true });
const cluster = new sst.aws.Cluster("MyCluster", { vpc });
new sst.aws.Service("MyService", {
cluster,
loadBalancer: {
public: false,
ports: [{ listen: "80/http" }],
},
});

View the full example.