{"record":{"id":"e8a57e416062f321","repo":"anomalyco/sst","slug":"storage-must-be-at-least-10-gb-for-the-name-ope","errorCode":null,"errorMessage":"Storage must be at least 10 GB for the ${name} OpenSearch domain.","messagePattern":"Storage must be at least 10 GB for the (.+?) OpenSearch domain\\.","errorType":"validation","errorClass":"VisibleError","httpStatus":null,"severity":"error","filePath":"platform/src/components/aws/open-search.ts","lineNumber":351,"sourceCode":"        };\n      });\n\n      const secret = secretsmanager.getSecretVersionOutput(\n        { secretId: input.password },\n        { parent: self },\n      );\n      const password = $jsonParse(secret.secretString).apply(\n        (v) => v.password as string,\n      );\n\n      return { domain, username: input.username, password };\n    }\n\n    function normalizeStorage() {\n      return output(args.storage ?? \"10 GB\").apply((v) => {\n        const size = toGBs(v);\n        if (size < 10) {\n          throw new VisibleError(\n            `Storage must be at least 10 GB for the ${name} OpenSearch domain.`,\n          );\n        }\n        return size;\n      });\n    }\n\n    function registerDev() {\n      if (!args.dev) return undefined;\n\n      if (\n        $dev &&\n        args.dev.password === undefined &&\n        args.password === undefined\n      ) {\n        throw new VisibleError(\n          `You must provide the password to connect to your locally running OpenSearch domain either by setting the \"dev.password\" or by setting the top-level \"password\" property.`,\n        );","sourceCodeStart":333,"sourceCodeEnd":369,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/platform/src/components/aws/open-search.ts#L333-L369","documentation":"AWS requires OpenSearch EBS-backed domains to have at least 10 GB of storage. SST validates the storage arg (converted to GB via toGBs) during normalization and throws before creating the domain if it's below this AWS minimum.","triggerScenarios":"Creating an sst.aws.OpenSearch component with `storage` set to a value that converts to less than 10 GB, e.g. \"5 GB\", \"1 GB\", or a small unit like \"500 MB\".","commonSituations":"Typing a smaller storage value to save cost without knowing AWS's 10 GB floor; copying a config from another component (e.g. RDBMS defaults) into OpenSearch.","solutions":["Set storage to at least \"10 GB\" in the OpenSearch args","Remove the storage arg entirely to use the default of 10 GB"],"exampleFix":"// before\nnew sst.aws.OpenSearch(\"MySearch\", { storage: \"5 GB\" });\n// after\nnew sst.aws.OpenSearch(\"MySearch\", { storage: \"10 GB\" });","handlingStrategy":"validation","validationCode":"const toGBs = (s: string) => {\n  const [, num, unit] = s.match(/([\\d.]+)\\s*(GB|MB|TB)/i) ?? [];\n  const n = parseFloat(num ?? \"0\");\n  const gb = /TB/i.test(unit ?? \"\") ? n * 1024 : /MB/i.test(unit ?? \"\") ? n / 1024 : n;\n  if (gb < 10) throw new Error(`OpenSearch storage must be >= 10 GB, got ${s}`);\n};","typeGuard":"function isValidOpenSearchStorage(s: string): boolean {\n  return toGBs(s) >= 10;\n}","tryCatchPattern":"try {\n  new sst.aws.OpenSearch(\"MySearch\", { storage: args.storage });\n} catch (e) {\n  if (String(e).includes(\"at least 10 GB\")) {\n    console.error(\"Storage below AWS minimum — use 10 GB or more\");\n  }\n  throw e;\n}","preventionTips":["Remember AWS's 10 GB EBS minimum for OpenSearch","Omit `storage` to use SST's safe 10 GB default","Add config lint checks for storage values in shared sst.config.ts helpers"],"tags":["opensearch","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"}