anomalyco/sst · error · VisibleError
Storage must be at least 20 GB for the ${name} Postgres data
Error message
Storage must be at least 20 GB for the ${name} Postgres database. What it means
RDS requires Postgres instances to have at least 20 GB of allocated storage. SST validates the storage arg (converted to GB) during component normalization and throws before provisioning if it's below the AWS minimum.
Source
Thrown at platform/src/components/aws/postgres.ts:594
}
function registerVersion(overrideVersion?: number) {
self.registerVersion({
new: _version,
old: overrideVersion ?? $cli.state.version[name],
message: [
`This component has been renamed. Please change:\n`,
`"sst.aws.Postgres" to "sst.aws.Postgres.v${$cli.state.version[name]}"\n`,
`Learn more https://sst.dev/docs/components/#versioning`,
].join("\n"),
});
}
function normalizeStorage() {
return output(args.storage ?? "20 GB").apply((v) => {
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.`,
);View on GitHub (pinned to a0bd20f762)
Solutions
- Set storage to at least "20 GB"
- Remove the storage arg to use the default 20 GB
Example fix
// before
new sst.aws.Postgres("MyPostgres", { storage: "10 GB" });
// after
new sst.aws.Postgres("MyPostgres", { storage: "20 GB" }); Defensive patterns
Strategy: validation
Validate before calling
const gb = toGBs(storage);
if (gb < 20) throw new Error(`Postgres storage must be >= 20 GB, got ${storage}`); Type guard
function isValidPostgresStorage(s: string): boolean {
return toGBs(s) >= 20;
} Try / catch
try {
new sst.aws.Postgres("MyPostgres", { storage: args.storage });
} catch (e) {
if (String(e).includes("at least 20 GB")) {
console.error("Storage below AWS RDS minimum — use 20 GB or more");
}
throw e;
} Prevention
- Remember RDS's 20 GB storage floor for Postgres
- Omit `storage` to use SST's 20 GB default
- Centralize storage parsing in a helper that validates both bounds
When it happens
Trigger: Creating sst.aws.Postgres with `storage` like "10 GB" or "5 GB", which converts below the 20 GB floor.
Common situations: Downsizing storage to cut cost; copying a storage value from another component's config; typos in the storage string.
Related errors
- Storage cannot be greater than 65536 GB (64 TB) for the ${na
- Storage must be at least 10 GB for the ${name} OpenSearch do
- Unsupported storage: ${v}. The supported value for storage i
- Storage must be at least 20 GB for the ${name} MySQL databas
- Storage cannot be greater than 65536 GB (64 TB) for the ${na
AI-assisted analysis of anomalyco/sst@a0bd20f762 (2026-08-30).
Data as JSON: /api/errors/6048f149f77abe2f.
Report an issue: GitHub.