anomalyco/sst · error · VisibleError
You are using the "Vpc.v1" component. Please migrate to the
Error message
You are using the "Vpc.v1" component. Please migrate to the latest "Vpc" component.
What it means
SST renamed/reworked its VPC component; the old version is still importable as Vpc.v1 but is no longer accepted by newer components like Postgres. Passing a Vpc.v1 instance to Postgres throws this VisibleError directing the user to migrate to the latest Vpc component.
Source
Thrown at platform/src/components/aws/postgres.ts:610
const size = toGBs(v);
if (size < 20) {
throw new VisibleError(
`Storage must be at least 20 GB for the ${name} Postgres database.`,
);
}
if (size > 65536) {
throw new VisibleError(
`Storage cannot be greater than 65536 GB (64 TB) for the ${name} Postgres database.`,
);
}
return size;
});
}
function normalizeVpc() {
// "vpc" is a Vpc.v1 component
if (args.vpc instanceof VpcV1) {
throw new VisibleError(
`You are using the "Vpc.v1" component. Please migrate to the latest "Vpc" component.`,
);
}
// "vpc" is a Vpc component
if (args.vpc instanceof Vpc) {
return {
subnets: args.vpc.privateSubnets,
};
}
// "vpc" is object
return output(args.vpc);
}
function registerDev() {
if (!args.dev) return undefined;
View on GitHub (pinned to a0bd20f762)
Solutions
- Replace Vpc.v1 usage with the latest sst.aws.Vpc component and update its args to the new API
- Follow SST's Vpc migration guide for the argument changes
- Ensure all components share the single new Vpc instance
Example fix
// before
const vpc = new sst.aws.Vpc.v1("MyVpc", { nat: "auto" });
new sst.aws.Postgres("MyPostgres", { vpc });
// after
const vpc = new sst.aws.Vpc("MyVpc", { nat: "auto" });
new sst.aws.Postgres("MyPostgres", { vpc }); Defensive patterns
Strategy: validation
Validate before calling
import { Vpc, Vpc as VpcLatest } from "sst/aws";
// ensure the vpc arg is an instance of the latest Vpc class, not Vpc.v1
if ((args.vpc as any)?.constructor?.name?.includes("v1"))
throw new Error("Use the latest sst.aws.Vpc component, not Vpc.v1"); Type guard
function isCurrentVpc(v: unknown): v is InstanceType<typeof VpcLatest> {
return v instanceof VpcLatest;
} Try / catch
try {
new sst.aws.Postgres("MyPostgres", { vpc });
} catch (e) {
if (String(e).includes("Vpc.v1")) {
console.error("Replace Vpc.v1 with the latest sst.aws.Vpc component (see SST Vpc migration guide)");
}
throw e;
} Prevention
- After upgrading SST, grep sst.config.ts for "Vpc.v1" and migrate to "Vpc"
- Import Vpc only from the current sst.aws namespace
- Follow the SST changelog/migration guide when bumping versions
When it happens
Trigger: Constructing a Vpc via the legacy `sst.aws.Vpc.v1` class and passing that instance in the `vpc` property of a Postgres component.
Common situations: Upgrading SST where docs/examples still show the old Vpc API; partially-migrated configs where some components use the new Vpc and others still import Vpc.v1.
Related errors
- You are using the "Vpc.v1" component. Please migrate to the
- Failed to get password for Postgres ${name}.
- You cannot provide both "vpc.containerSubnets" and "vpc.serv
- Missing "vpc.containerSubnets" for the "${name}" Cluster com
- You cannot provide both "job" and "function" in the "${name}
AI-assisted analysis of anomalyco/sst@a0bd20f762 (2026-08-30).
Data as JSON: /api/errors/9bde8a82a1f90811.
Report an issue: GitHub.