anomalyco/sst · error · VisibleError
Storage must be at least 20 GB for the ${name} MySQL databas
Error message
Storage must be at least 20 GB for the ${name} MySQL database. What it means
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.
Source
Thrown at platform/src/components/aws/mysql.ts:565
throw new VisibleError(`Failed to get password for MySQL ${name}.`);
const secret = secretsmanager.getSecretVersionOutput(
{ secretId: passwordTag },
{ parent: self },
);
return $jsonParse(secret.secretString).apply(
(v) => v.password as string,
);
});
return { instance, proxy, password };
}
function normalizeStorage() {
return output(args.storage ?? "20 GB").apply((v) => {
const size = toGBs(v);
if (size < 20) {
throw new VisibleError(
`Storage must be at least 20 GB for the ${name} MySQL database.`,
);
}
if (size > 65536) {
throw new VisibleError(
`Storage cannot be greater than 65536 GB (64 TB) for the ${name} MySQL database.`,
);
}
return size;
});
}
function normalizeVpc() {
// "vpc" is a Vpc.v1 component
if (args.vpc instanceof VpcV1) {
throw new VisibleError(
`You are using the "Vpc.v1" component. Please migrate to the latest "Vpc" component.`,
);View on GitHub (pinned to a0bd20f762)
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"
Example fix
// before
new sst.aws.MySql("MyDb", { storage: "10 GB" });
// after
new sst.aws.MySql("MyDb", { storage: "20 GB" }); Defensive patterns
Strategy: validation
Validate before calling
const gb = toGBs(args.storage ?? "20 GB");
if (gb < 20) throw new Error(`MySQL storage must be >= 20 GB, got ${gb} GB`); Prevention
- 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
When it happens
Trigger: new sst.aws.MySql("MyDb", { storage: "10 GB" }) or any storage value whose toGBs() conversion is below 20.
Common situations: 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.
Related errors
- Storage cannot be greater than 65536 GB (64 TB) for the ${na
- Lifecycle rule at index ${index} has an empty or whitespace-
- The DNS record "${partial.name}" cannot be created because t
- Unsupported storage: ${v}. The supported value for storage i
- type === "service" ? `You cannot provide both "containers" a
AI-assisted analysis of anomalyco/sst@a0bd20f762 (2026-08-30).
Data as JSON: /api/errors/90e810a8726a65d2.
Report an issue: GitHub.