anomalyco/sst · error · VisibleError
Storage must be at least 10 GB for the ${name} OpenSearch do
Error message
Storage must be at least 10 GB for the ${name} OpenSearch domain. What it means
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.
Source
Thrown at platform/src/components/aws/open-search.ts:351
};
});
const secret = secretsmanager.getSecretVersionOutput(
{ secretId: input.password },
{ parent: self },
);
const password = $jsonParse(secret.secretString).apply(
(v) => v.password as string,
);
return { domain, username: input.username, password };
}
function normalizeStorage() {
return output(args.storage ?? "10 GB").apply((v) => {
const size = toGBs(v);
if (size < 10) {
throw new VisibleError(
`Storage must be at least 10 GB for the ${name} OpenSearch domain.`,
);
}
return size;
});
}
function registerDev() {
if (!args.dev) return undefined;
if (
$dev &&
args.dev.password === undefined &&
args.password === undefined
) {
throw new VisibleError(
`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.`,
);View on GitHub (pinned to a0bd20f762)
Solutions
- Set storage to at least "10 GB" in the OpenSearch args
- Remove the storage arg entirely to use the default of 10 GB
Example fix
// before
new sst.aws.OpenSearch("MySearch", { storage: "5 GB" });
// after
new sst.aws.OpenSearch("MySearch", { storage: "10 GB" }); Defensive patterns
Strategy: validation
Validate before calling
const toGBs = (s: string) => {
const [, num, unit] = s.match(/([\d.]+)\s*(GB|MB|TB)/i) ?? [];
const n = parseFloat(num ?? "0");
const gb = /TB/i.test(unit ?? "") ? n * 1024 : /MB/i.test(unit ?? "") ? n / 1024 : n;
if (gb < 10) throw new Error(`OpenSearch storage must be >= 10 GB, got ${s}`);
}; Type guard
function isValidOpenSearchStorage(s: string): boolean {
return toGBs(s) >= 10;
} Try / catch
try {
new sst.aws.OpenSearch("MySearch", { storage: args.storage });
} catch (e) {
if (String(e).includes("at least 10 GB")) {
console.error("Storage below AWS minimum — use 10 GB or more");
}
throw e;
} Prevention
- 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
When it happens
Trigger: 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".
Common situations: 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.
Related errors
- Storage must be at least 20 GB for the ${name} Postgres data
- Storage cannot be greater than 65536 GB (64 TB) for the ${na
- Unsupported storage: ${v}. The supported value for storage i
- The provided ARN "${arn}" is not a OpenSearch domain ARN.
- Unsupported storage: ${v}. The supported value for storage i
AI-assisted analysis of anomalyco/sst@a0bd20f762 (2026-08-30).
Data as JSON: /api/errors/e8a57e416062f321.
Report an issue: GitHub.