{"record":{"id":"cca768f6fab89122","repo":"anomalyco/sst","slug":"unsupported-storage-v-the-supported-value-for","errorCode":null,"errorMessage":"Unsupported storage: ${v}. The supported value for storage is between \"20 GB\" and \"200 GB\"","messagePattern":"Unsupported storage: (.+?)\\. The supported value for storage is between \"20 GB\" and \"200 GB\"","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"platform/src/components/aws/fargate.ts","lineNumber":842,"sourceCode":"  args: FargateBaseArgs,\n) {\n  return all([cpu, args.memory ?? \"0.5 GB\"]).apply(([cpu, v]) => {\n    if (!(v in supportedMemories[cpu])) {\n      throw new Error(\n        `Unsupported memory: ${v}. The supported values for memory for a ${cpu} CPU are ${Object.keys(\n          supportedMemories[cpu],\n        ).join(\", \")}`,\n      );\n    }\n    return v;\n  });\n}\n\nexport function normalizeStorage(args: FargateBaseArgs) {\n  return output(args.storage ?? \"20 GB\").apply((v) => {\n    const storage = toGBs(v);\n    if (storage < 20 || storage > 200)\n      throw new Error(\n        `Unsupported storage: ${v}. The supported value for storage is between \"20 GB\" and \"200 GB\"`,\n      );\n    return v;\n  });\n}\n\nexport function normalizeContainers(\n  type: \"service\" | \"task\",\n  args: Omit<ServiceArgs, \"public\">,\n  name: string,\n  architecture: ReturnType<typeof normalizeArchitecture>,\n) {\n  if (\n    args.containers &&\n    (args.image ||\n      args.logging ||\n      args.environment ||\n      args.environmentFiles ||","sourceCodeStart":824,"sourceCodeEnd":860,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/platform/src/components/aws/fargate.ts#L824-L860","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before\nnew sst.aws.Fargate(\"App\", { storage: \"10 GB\" });\n// after\nnew sst.aws.Fargate(\"App\", { storage: \"50 GB\" });","handlingStrategy":"validation","validationCode":"import { toGBs } from \"./platform/src/components/aws/fargate\"; // or replicate\nconst gbs = typeof storage === \"number\" ? storage : toGBs(storage);\nif (gbs < 20 || gbs > 200) throw new Error(`storage must be 20-200 GB, got ${storage}`);","typeGuard":"function isValidFargateStorage(storage: unknown): boolean {\n  const gbs = typeof storage === \"number\" ? storage : parseGBs(String(storage));\n  return gbs >= 20 && gbs <= 200;\n}","tryCatchPattern":"try {\n  const storage = normalizeStorage(args);\n  // use storage\n} catch (e) {\n  console.error(`Invalid Fargate storage: ${(e as Error).message}. Use 20-200 GB.`);\n}","preventionTips":["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"],"tags":["aws","fargate","storage","validation"],"backgroundTag":"fargate-storage-out-of-range","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}