{"record":{"id":"800656743475f28e","repo":"anomalyco/sst","slug":"cannot-configure-pauseafter-when-the-minimum-acu","errorCode":null,"errorMessage":"Cannot configure \"pauseAfter\" when the minimum ACU is not 0 for the \"${name}\" Aurora database.","messagePattern":"Cannot configure \"pauseAfter\" when the minimum ACU is not 0 for the \"(.+?)\" Aurora database\\.","errorType":"exception","errorClass":"VisibleError","httpStatus":null,"severity":"error","filePath":"platform/src/components/aws/aurora.ts","lineNumber":794,"sourceCode":"        .apply((tags) => tags?.[\"sst:ref:proxy\"])\n        .apply((proxyTag) =>\n          proxyTag\n            ? rds.Proxy.get(`${name}Proxy`, proxyTag, undefined, {\n                parent: self,\n              })\n            : undefined,\n        );\n\n      return { cluster, instance, proxy, password, secret };\n    }\n\n    function normalizeScaling() {\n      return output(args.scaling).apply((scaling) => {\n        const max = scaling?.max ?? \"4 ACU\";\n        const min = scaling?.min ?? \"0 ACU\";\n        const isAutoPauseEnabled = parseACU(min) === 0;\n        if (scaling?.pauseAfter && !isAutoPauseEnabled) {\n          throw new VisibleError(\n            `Cannot configure \"pauseAfter\" when the minimum ACU is not 0 for the \"${name}\" Aurora database.`,\n          );\n        }\n\n        return {\n          max,\n          min,\n          pauseAfter: isAutoPauseEnabled\n            ? scaling?.pauseAfter ?? \"5 minutes\"\n            : undefined,\n        };\n      });\n    }\n\n    function normalizeReplicas() {\n      return output(args.replicas ?? 0).apply((replicas) => {\n        if (replicas > 15) {\n          throw new VisibleError(","sourceCodeStart":776,"sourceCodeEnd":812,"githubUrl":"https://github.com/anomalyco/sst/blob/a0bd20f762883e72a35caccb4896c42ce5b3f707/platform/src/components/aws/aurora.ts#L776-L812","documentation":"Aurora Serverless can only auto-pause (scale to zero) when the minimum capacity is 0 ACU. `pauseAfter` implies the database will pause, so SST rejects configuring `pauseAfter` while `scaling.min` is a non-zero ACU value, as the combination is invalid for the Data API/auto-pause behavior.","triggerScenarios":"Passing `scaling: { min: \"2 ACU\", pauseAfter: \"10 minutes\" }` (or leaving min at any default above 0) to an Aurora component's `scaling` argument.","commonSituations":"Setting a floor capacity to avoid cold starts while also wanting auto-pause cost savings — the two are mutually exclusive; copying a scaling block between components.","solutions":["Set `scaling.min` to `\"0 ACU\"` when using `pauseAfter`, e.g. `scaling: { min: \"0 ACU\", max: \"4 ACU\", pauseAfter: \"10 minutes\" }`","Or remove `pauseAfter` if you need a non-zero minimum capacity","Validate ACU strings are parseable (e.g. \"0 ACU\", \"0.5 ACU\") — parseACU must evaluate to 0"],"exampleFix":"// before\nscaling: { min: \"2 ACU\", max: \"8 ACU\", pauseAfter: \"10 minutes\" }\n// after\nscaling: { min: \"0 ACU\", max: \"8 ACU\", pauseAfter: \"10 minutes\" }","handlingStrategy":"validation","validationCode":"function validateScaling(scaling) {\n  const min = parseACU(scaling?.min ?? \"0 ACU\");\n  if (scaling?.pauseAfter && min !== 0)\n    throw new Error('pauseAfter requires scaling.min = \"0 ACU\"');\n}\n// parseACU: parse the ACU string, e.g. parseFloat(min) === 0","typeGuard":"function canAutoPause(scaling) {\n  return !scaling?.pauseAfter || parseFloat(scaling?.min ?? \"0\") === 0;\n}","tryCatchPattern":"null","preventionTips":["Decide up front: either auto-pause (min 0 ACU + pauseAfter) or always-on (min > 0, no pauseAfter)","Review scaling blocks when copying config between components","Add a config lint/test asserting min==0 whenever pauseAfter is set"],"tags":["aurora","autoscaling","serverless","config-validation"],"backgroundTag":"mutually-exclusive-config","analyzedSha":"a0bd20f762883e72a35caccb4896c42ce5b3f707","analyzedAt":"2026-08-30T11:26:00.383Z","schemaVersion":2},"datasetVersion":"2026-08-30T13:17:10.514Z"}