anomalyco/sst · error · VisibleError

Cannot configure "pauseAfter" when the minimum ACU is not 0

Error message

Cannot configure "pauseAfter" when the minimum ACU is not 0 for the "${name}" Aurora database.

What it means

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.

Source

Thrown at platform/src/components/aws/aurora.ts:794

        .apply((tags) => tags?.["sst:ref:proxy"])
        .apply((proxyTag) =>
          proxyTag
            ? rds.Proxy.get(`${name}Proxy`, proxyTag, undefined, {
                parent: self,
              })
            : undefined,
        );

      return { cluster, instance, proxy, password, secret };
    }

    function normalizeScaling() {
      return output(args.scaling).apply((scaling) => {
        const max = scaling?.max ?? "4 ACU";
        const min = scaling?.min ?? "0 ACU";
        const isAutoPauseEnabled = parseACU(min) === 0;
        if (scaling?.pauseAfter && !isAutoPauseEnabled) {
          throw new VisibleError(
            `Cannot configure "pauseAfter" when the minimum ACU is not 0 for the "${name}" Aurora database.`,
          );
        }

        return {
          max,
          min,
          pauseAfter: isAutoPauseEnabled
            ? scaling?.pauseAfter ?? "5 minutes"
            : undefined,
        };
      });
    }

    function normalizeReplicas() {
      return output(args.replicas ?? 0).apply((replicas) => {
        if (replicas > 15) {
          throw new VisibleError(

View on GitHub (pinned to a0bd20f762)

Solutions

  1. Set `scaling.min` to `"0 ACU"` when using `pauseAfter`, e.g. `scaling: { min: "0 ACU", max: "4 ACU", pauseAfter: "10 minutes" }`
  2. Or remove `pauseAfter` if you need a non-zero minimum capacity
  3. Validate ACU strings are parseable (e.g. "0 ACU", "0.5 ACU") — parseACU must evaluate to 0

Example fix

// before
scaling: { min: "2 ACU", max: "8 ACU", pauseAfter: "10 minutes" }
// after
scaling: { min: "0 ACU", max: "8 ACU", pauseAfter: "10 minutes" }
Defensive patterns

Strategy: validation

Validate before calling

function validateScaling(scaling) {
  const min = parseACU(scaling?.min ?? "0 ACU");
  if (scaling?.pauseAfter && min !== 0)
    throw new Error('pauseAfter requires scaling.min = "0 ACU"');
}
// parseACU: parse the ACU string, e.g. parseFloat(min) === 0

Type guard

function canAutoPause(scaling) {
  return !scaling?.pauseAfter || parseFloat(scaling?.min ?? "0") === 0;
}

Try / catch

null

Prevention

When it happens

Trigger: Passing `scaling: { min: "2 ACU", pauseAfter: "10 minutes" }` (or leaving min at any default above 0) to an Aurora component's `scaling` argument.

Common situations: 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.

Related errors


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