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 "21 GB" and "200 GB"

What it means

Fargate ephemeral storage must be between 21 GB and 200 GB. `normalizeStorage` converts the `storage` arg to GBs via `toGBs` and throws when it falls outside that range. The default is "21 GB".

Source

Thrown at platform/src/components/aws/service-v1.ts:215

    function normalizeMemory() {
      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;
      });
    }

    function normalizeStorage() {
      return output(args.storage ?? "21 GB").apply((v) => {
        const storage = toGBs(v);
        if (storage < 21 || storage > 200)
          throw new Error(
            `Unsupported storage: ${v}. The supported value for storage is between "21 GB" and "200 GB"`,
          );
        return v;
      });
    }

    function normalizeScaling() {
      return output(args.scaling).apply((v) => ({
        min: v?.min ?? 1,
        max: v?.max ?? 1,
        cpuUtilization: v?.cpuUtilization ?? 70,
        memoryUtilization: v?.memoryUtilization ?? 70,
      }));
    }

    function normalizeLogging() {
      return output(args.logging).apply((logging) => ({
        ...logging,

View on GitHub (pinned to a0bd20f762)

Solutions

  1. Set `storage` to a value between "21 GB" and "200 GB" inclusive (e.g. "50 GB")
  2. Remove the `storage` arg to use the default "21 GB"
  3. If you need more than 200 GB, mount an EFS volume instead of increasing ephemeral storage

Example fix

// before
new sst.aws.Service("Api", { storage: "500 GB" });
// after
new sst.aws.Service("Api", { storage: "200 GB" });
Defensive patterns

Strategy: validation

Validate before calling

if (args.storage) {
  const gb = parseInt(args.storage);
  if (isNaN(gb) || gb < 21 || gb > 200) throw new Error("storage must be between 21 GB and 200 GB");
}

Prevention

When it happens

Trigger: Passing `storage` less than 21 GB or greater than 200 GB, e.g. `storage: "10 GB"` or `storage: "500 GB"`, or an unparseable string that toGBs maps out of range.

Common situations: Trying to shrink storage to save cost below Fargate's minimum; assuming container-docker-like storage limits; typos in units.

Related errors


AI-assisted analysis of anomalyco/sst@a0bd20f762 (2026-08-30). Data as JSON: /api/errors/903bbef93dba0088. Report an issue: GitHub.