remotion-dev/remotion · error · TypeError

parameter 'timeoutInSeconds' must be an integer but got ${ti

Error message

parameter 'timeoutInSeconds' must be an integer but got ${timeoutInSeconds}

What it means

Thrown by validateTimeout() in @remotion/lambda when timeoutInSeconds is a finite number inside the valid range but not an integer (timeoutInSeconds % 1 !== 0). AWS Lambda expects the timeout as whole seconds.

Source

Thrown at packages/lambda/src/shared/validate-timeout.ts:27

	if (Number.isNaN(timeoutInSeconds)) {
		throw new TypeError(`parameter 'timeoutInSeconds' must not be NaN, but is`);
	}

	if (!Number.isFinite(timeoutInSeconds)) {
		throw new TypeError(
			`parameter 'timeoutInSeconds' must be finite, but is ${timeoutInSeconds}`,
		);
	}

	if (timeoutInSeconds < MIN_TIMEOUT || timeoutInSeconds > MAX_TIMEOUT) {
		throw new TypeError(
			`parameter 'timeoutInSeconds' must be between ${MIN_TIMEOUT} and ${MAX_TIMEOUT}, but got ${timeoutInSeconds}`,
		);
	}

	if (timeoutInSeconds % 1 !== 0) {
		throw new TypeError(
			`parameter 'timeoutInSeconds' must be an integer but got ${timeoutInSeconds}`,
		);
	}
};

View on GitHub (pinned to 78fe4bb3fd)

Solutions

  1. Round to a whole second: Math.round(timeoutInSeconds) (or ceil to be safe).
  2. When converting from ms: Math.round(ms / 1000).
  3. Use integer literals in config.

Example fix

// before
const timeoutInSeconds = estimatedMs / 1000; // e.g. 119750 / 1000 = 119.75

// after
const timeoutInSeconds = Math.round(estimatedMs / 1000);
Defensive patterns

Strategy: validation

Validate before calling

const timeoutInSeconds = Math.round(Number(raw));

Type guard

const isIntegerSeconds = (v: unknown): v is number =>
  typeof v === 'number' && Number.isInteger(v);

Prevention

When it happens

Trigger: Passing a fractional second value like 120.5 or 90.25 to deployFunction().

Common situations: Computing timeout as a fraction (e.g. estimatedSeconds * 1.1), converting from milliseconds and forgetting to round (ms / 1000), or reading a decimal from a config file.

Understand the failure class

Related errors


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/b5547fb41fc01872. Report an issue: GitHub.