{"record":{"id":"d231261bc8f407de","repo":"anomalyco/sst","slug":"storage-cannot-be-greater-than-65536-gb-64-tb-fo-d23126","errorCode":null,"errorMessage":"Storage cannot be greater than 65536 GB (64 TB) for the ${name} Postgres database.","messagePattern":"Storage cannot be greater than 65536 GB \\(64 TB\\) for the (.+?) Postgres database\\.","errorType":"validation","errorClass":"VisibleError","httpStatus":null,"severity":"error","filePath":"platform/src/components/aws/postgres.ts","lineNumber":599,"sourceCode":"        old: overrideVersion ?? $cli.state.version[name],\n        message: [\n          `This component has been renamed. Please change:\\n`,\n          `\"sst.aws.Postgres\" to \"sst.aws.Postgres.v${$cli.state.version[name]}\"\\n`,\n          `Learn more https://sst.dev/docs/components/#versioning`,\n        ].join(\"\\n\"),\n      });\n    }\n\n    function normalizeStorage() {\n      return output(args.storage ?? \"20 GB\").apply((v) => {\n        const size = toGBs(v);\n        if (size < 20) {\n          throw new VisibleError(\n            `Storage must be at least 20 GB for the ${name} Postgres database.`,\n          );\n        }\n        if (size > 65536) {\n          throw new VisibleError(\n            `Storage cannot be greater than 65536 GB (64 TB) for the ${name} Postgres database.`,\n          );\n        }\n        return size;\n      });\n    }\n\n    function normalizeVpc() {\n      // \"vpc\" is a Vpc.v1 component\n      if (args.vpc instanceof VpcV1) {\n        throw new VisibleError(\n          `You are using the \"Vpc.v1\" component. Please migrate to the latest \"Vpc\" component.`,\n        );\n      }\n\n      // \"vpc\" is a Vpc component\n      if (args.vpc instanceof Vpc) {\n        return {","sourceCodeStart":581,"sourceCodeEnd":617,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/platform/src/components/aws/postgres.ts#L581-L617","documentation":"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.","triggerScenarios":"Creating sst.aws.Postgres with `storage` set above 65536 GB, e.g. \"70 TB\" or \"100000 GB\".","commonSituations":"Over-provisioning \"to be safe\"; misreading units (TB vs GB) in the storage string.","solutions":["Reduce storage to 65536 GB (64 TB) or less","For larger datasets, use Aurora Serverless v2 or sharding across multiple clusters instead of a single instance's storage"],"exampleFix":"// before\nnew sst.aws.Postgres(\"MyPostgres\", { storage: \"80 TB\" });\n// after\nnew sst.aws.Postgres(\"MyPostgres\", { storage: \"64 TB\" });","handlingStrategy":"validation","validationCode":"const gb = toGBs(storage);\nif (gb > 65536) throw new Error(`Postgres storage must be <= 65536 GB (64 TB), got ${storage}`);","typeGuard":"function isValidPostgresStorageMax(s: string): boolean {\n  return toGBs(s) <= 65536;\n}","tryCatchPattern":"try {\n  new sst.aws.Postgres(\"MyPostgres\", { storage: args.storage });\n} catch (e) {\n  if (String(e).includes(\"65536\")) {\n    console.error(\"Storage above RDS 64 TB cap — reduce it or use Aurora Serverless v2\");\n  }\n  throw e;\n}","preventionTips":["Cap storage at 64 TB; consider Aurora Serverless v2 for larger datasets","Double-check TB vs GB units when writing storage strings","Validate bounds (20–65536 GB) in one shared helper"],"tags":["postgres","rds","validation","storage","aws-limits"],"backgroundTag":"storage-above-maximum","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}