anomalyco/sst · error · VisibleError

Storage cannot be greater than 65536 GB (64 TB) for the ${na

Error message

Storage cannot be greater than 65536 GB (64 TB) for the ${name} Postgres database.

What it means

RDS caps Postgres allocated storage at 65536 GB (64 TB). SST enforces this upper bound during normalization so the deployment fails fast with a clear message instead of an opaque AWS API error.

Source

Thrown at platform/src/components/aws/postgres.ts:599

        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.`,
        );
      }

      // "vpc" is a Vpc component
      if (args.vpc instanceof Vpc) {
        return {

View on GitHub (pinned to a0bd20f762)

Solutions

  1. Reduce storage to 65536 GB (64 TB) or less
  2. For larger datasets, use Aurora Serverless v2 or sharding across multiple clusters instead of a single instance's storage

Example fix

// before
new sst.aws.Postgres("MyPostgres", { storage: "80 TB" });
// after
new sst.aws.Postgres("MyPostgres", { storage: "64 TB" });
Defensive patterns

Strategy: validation

Validate before calling

const gb = toGBs(storage);
if (gb > 65536) throw new Error(`Postgres storage must be <= 65536 GB (64 TB), got ${storage}`);

Type guard

function isValidPostgresStorageMax(s: string): boolean {
  return toGBs(s) <= 65536;
}

Try / catch

try {
  new sst.aws.Postgres("MyPostgres", { storage: args.storage });
} catch (e) {
  if (String(e).includes("65536")) {
    console.error("Storage above RDS 64 TB cap — reduce it or use Aurora Serverless v2");
  }
  throw e;
}

Prevention

When it happens

Trigger: Creating sst.aws.Postgres with `storage` set above 65536 GB, e.g. "70 TB" or "100000 GB".

Common situations: Over-provisioning "to be safe"; misreading units (TB vs GB) in the storage string.

Related errors


AI-assisted analysis of anomalyco/sst@a0bd20f762 (2026-08-30). Data as JSON: /api/errors/d231261bc8f407de. Report an issue: GitHub.