anomalyco/sst · error · VisibleError

Provisioned concurrency requires function versioning. Set "v

Error message

Provisioned concurrency requires function versioning. Set "versioning: true" to enable function versioning.

What it means

Provisioned concurrency in AWS Lambda requires a published Lambda version to attach to. The Function constructor checks `concurrency.provisioned` against `versioning`/`publish` and throws this VisibleError when provisioned concurrency is configured but versioning is disabled.

Source

Thrown at platform/src/components/aws/function.ts:2905

                ",",
              ),
            ),
          },
          { parent },
        );
        return url.route.routerUrl;
      });
    }

    function createProvisioned() {
      return all([args.concurrency, fn.publish]).apply(
        ([concurrency, publish]) => {
          if (!concurrency?.provisioned || concurrency.provisioned === 0) {
            return;
          }

          if (publish !== true) {
            throw new VisibleError(
              `Provisioned concurrency requires function versioning. Set "versioning: true" to enable function versioning.`,
            );
          }

          return new lambda.ProvisionedConcurrencyConfig(
            `${name}Provisioned`,
            {
              functionName: fn.name,
              qualifier: fn.version,
              provisionedConcurrentExecutions: concurrency.provisioned,
            },
            { parent },
          );
        },
      );
    }

    function createEventInvokeConfig() {

View on GitHub (pinned to a0bd20f762)

Solutions

  1. Add versioning: true to the Function args
  2. If using an alias in front of the function, point it at the versioned function

Example fix

// before
new sst.aws.Function("Fn", { concurrency: { provisioned: 5 } });
// after
new sst.aws.Function("Fn", { versioning: true, concurrency: { provisioned: 5 } });
Defensive patterns

Strategy: validation

Validate before calling

if (args.concurrency?.provisioned && args.concurrency.provisioned > 0 && args.versioning !== true)
  throw new Error("versioning: true is required for provisioned concurrency");

Try / catch

try {
  new sst.aws.Function("Fn", args);
} catch (e) {
  if ((e as Error).message.includes("Provisioned concurrency requires")) {
    console.error("Enable versioning: true");
  }
  throw e;
}

Prevention

When it happens

Trigger: new sst.aws.Function("Fn", { concurrency: { provisioned: 5 } }) without versioning: true (or publish: true) in the args.

Common situations: Adding provisioned concurrency to an existing function to eliminate cold starts while leaving versioning off; copy-pasting concurrency snippets from docs that assume versioning is enabled.

Related errors


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