anomalyco/sst · error · Error
Unsupported storage: ${v}. The supported value for storage i
Error message
Unsupported storage: ${v}. The supported value for storage is between "20 GB" and "200 GB" What it means
normalizeStorage() in the SST Fargate component validates the `storage` argument by converting it to GB. AWS Fargate only supports ephemeral storage between 20 GB and 200 GB, so any value outside that range is rejected with this error.
Source
Thrown at platform/src/components/aws/fargate.ts:842
args: FargateBaseArgs,
) {
return all([cpu, args.memory ?? "0.5 GB"]).apply(([cpu, v]) => {
if (!(v in supportedMemories[cpu])) {
throw new Error(
`Unsupported memory: ${v}. The supported values for memory for a ${cpu} CPU are ${Object.keys(
supportedMemories[cpu],
).join(", ")}`,
);
}
return v;
});
}
export function normalizeStorage(args: FargateBaseArgs) {
return output(args.storage ?? "20 GB").apply((v) => {
const storage = toGBs(v);
if (storage < 20 || storage > 200)
throw new Error(
`Unsupported storage: ${v}. The supported value for storage is between "20 GB" and "200 GB"`,
);
return v;
});
}
export function normalizeContainers(
type: "service" | "task",
args: Omit<ServiceArgs, "public">,
name: string,
architecture: ReturnType<typeof normalizeArchitecture>,
) {
if (
args.containers &&
(args.image ||
args.logging ||
args.environment ||
args.environmentFiles ||View on GitHub (pinned to a0bd20f762)
Solutions
- Set storage to a value between 20 GB and 200 GB, e.g. storage: "100 GB"
- If you need more disk, attach an EFS volume via volumes instead of increasing ephemeral storage
- Remove the storage property to use the 20 GB default
Example fix
// before
new sst.aws.Fargate("App", { storage: "10 GB" });
// after
new sst.aws.Fargate("App", { storage: "50 GB" }); Defensive patterns
Strategy: validation
Validate before calling
import { toGBs } from "./platform/src/components/aws/fargate"; // or replicate
const gbs = typeof storage === "number" ? storage : toGBs(storage);
if (gbs < 20 || gbs > 200) throw new Error(`storage must be 20-200 GB, got ${storage}`); Type guard
function isValidFargateStorage(storage: unknown): boolean {
const gbs = typeof storage === "number" ? storage : parseGBs(String(storage));
return gbs >= 20 && gbs <= 200;
} Try / catch
try {
const storage = normalizeStorage(args);
// use storage
} catch (e) {
console.error(`Invalid Fargate storage: ${(e as Error).message}. Use 20-200 GB.`);
} Prevention
- Only use values between "20 GB" and "200 GB" for Fargate storage
- Use EFS volumes for storage needs beyond 200 GB
- Omit `storage` to accept the 20 GB default
When it happens
Trigger: Passing `storage` in Fargate/FargateService args that converts (via toGBs) to less than 20 GB or more than 200 GB, e.g. storage: "10 GB" or storage: "500 GB" or storage: 300.
Common situations: Developers copying storage settings from EC2 instances (where 8 GB or 1 TB is fine) into Fargate task definitions; typos like "2000 GB"; assuming Fargate supports large ephemeral storage for big Docker builds or caches.
Related errors
- type === "service" ? `You cannot provide both "containers" a
- Unsupported storage: ${v}. The supported value for storage i
- The listen protocol "${v.listen}" must match the forward pro
- Lifecycle rule at index ${index} has an empty or whitespace-
- The DNS record "${partial.name}" cannot be created because t
AI-assisted analysis of anomalyco/sst@a0bd20f762 (2026-08-30).
Data as JSON: /api/errors/cca768f6fab89122.
Report an issue: GitHub.