{"record":{"id":"90e810a8726a65d2","repo":"anomalyco/sst","slug":"storage-must-be-at-least-20-gb-for-the-name-mys","errorCode":null,"errorMessage":"Storage must be at least 20 GB for the ${name} MySQL database.","messagePattern":"Storage must be at least 20 GB for the (.+?) MySQL database\\.","errorType":"validation","errorClass":"VisibleError","httpStatus":null,"severity":"error","filePath":"platform/src/components/aws/mysql.ts","lineNumber":565,"sourceCode":"          throw new VisibleError(`Failed to get password for MySQL ${name}.`);\n\n        const secret = secretsmanager.getSecretVersionOutput(\n          { secretId: passwordTag },\n          { parent: self },\n        );\n        return $jsonParse(secret.secretString).apply(\n          (v) => v.password as string,\n        );\n      });\n\n      return { instance, proxy, password };\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} MySQL database.`,\n          );\n        }\n        if (size > 65536) {\n          throw new VisibleError(\n            `Storage cannot be greater than 65536 GB (64 TB) for the ${name} MySQL 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":547,"sourceCodeEnd":583,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/platform/src/components/aws/mysql.ts#L547-L583","documentation":"SST validates the requested storage size for an RDS MySQL instance during normalization. AWS requires at least 20 GB of allocated storage, so any smaller value passed via the `storage` argument throws this VisibleError at synth time.","triggerScenarios":"new sst.aws.MySql(\"MyDb\", { storage: \"10 GB\" }) or any storage value whose toGBs() conversion is below 20.","commonSituations":"Setting storage to small values like \"5 GB\" or \"10 GB\" copied from local-database configs; typos in units causing the parser to compute a tiny size.","solutions":["Set the storage argument to at least \"20 GB\"","Remove the storage argument entirely to use the default of 20 GB","Check units: use GB/TB strings like \"25 GB\" or \"100 GB\""],"exampleFix":"// before\nnew sst.aws.MySql(\"MyDb\", { storage: \"10 GB\" });\n// after\nnew sst.aws.MySql(\"MyDb\", { storage: \"20 GB\" });","handlingStrategy":"validation","validationCode":"const gb = toGBs(args.storage ?? \"20 GB\");\nif (gb < 20) throw new Error(`MySQL storage must be >= 20 GB, got ${gb} GB`);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate storage values against the AWS 20 GB minimum before deploy","Use explicit units (\"20 GB\") and avoid ambiguous numbers","Rely on the default (omit storage) unless a specific size is needed","Add pre-deploy lint/config checks for RDS sizing"],"tags":["mysql","aws","rds","validation"],"backgroundTag":"resource-size-below-minimum","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}