{"record":{"id":"6048f149f77abe2f","repo":"anomalyco/sst","slug":"storage-must-be-at-least-20-gb-for-the-name-pos","errorCode":null,"errorMessage":"Storage must be at least 20 GB for the ${name} Postgres database.","messagePattern":"Storage must be at least 20 GB for the (.+?) Postgres database\\.","errorType":"validation","errorClass":"VisibleError","httpStatus":null,"severity":"error","filePath":"platform/src/components/aws/postgres.ts","lineNumber":594,"sourceCode":"    }\n\n    function registerVersion(overrideVersion?: number) {\n      self.registerVersion({\n        new: _version,\n        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        );","sourceCodeStart":576,"sourceCodeEnd":612,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/platform/src/components/aws/postgres.ts#L576-L612","documentation":"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.","triggerScenarios":"Creating sst.aws.Postgres with `storage` like \"10 GB\" or \"5 GB\", which converts below the 20 GB floor.","commonSituations":"Downsizing storage to cut cost; copying a storage value from another component's config; typos in the storage string.","solutions":["Set storage to at least \"20 GB\"","Remove the storage arg to use the default 20 GB"],"exampleFix":"// before\nnew sst.aws.Postgres(\"MyPostgres\", { storage: \"10 GB\" });\n// after\nnew sst.aws.Postgres(\"MyPostgres\", { storage: \"20 GB\" });","handlingStrategy":"validation","validationCode":"const gb = toGBs(storage);\nif (gb < 20) throw new Error(`Postgres storage must be >= 20 GB, got ${storage}`);","typeGuard":"function isValidPostgresStorage(s: string): boolean {\n  return toGBs(s) >= 20;\n}","tryCatchPattern":"try {\n  new sst.aws.Postgres(\"MyPostgres\", { storage: args.storage });\n} catch (e) {\n  if (String(e).includes(\"at least 20 GB\")) {\n    console.error(\"Storage below AWS RDS minimum — use 20 GB or more\");\n  }\n  throw e;\n}","preventionTips":["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"],"tags":["postgres","rds","validation","storage","aws-limits"],"backgroundTag":"storage-below-minimum","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}