remotion-dev/remotion · error

Params must be renderer

Error message

Params must be renderer

What it means

The serverless renderer Lambda handler validates that the incoming payload has type === ServerlessRoutines.renderer before doing any work. Any other routine type dispatched to this handler is a programming/routing error, so it throws immediately.

Source

Thrown at packages/serverless/src/handlers/renderer.ts:72

	params: ServerlessPayload<Provider>;
	options: Options;
	logs: BrowserLog[];
	onStream: OnStream<Provider>;
	providerSpecifics: ProviderSpecifics<Provider>;
	insideFunctionSpecifics: InsideFunctionSpecifics<Provider>;
	onBrowserInstance: (browserInstance: LaunchedBrowser) => void;
	onMediaFiles:
		| ((options: {
				videoOutputLocation: string;
				audioOutputLocation: string | null;
				isAudioOnly: boolean;
				completedAt: number;
		  }) => Promise<void>)
		| null;
	cancelSignal: CancelSignal | null;
}): Promise<{}> => {
	if (params.type !== ServerlessRoutines.renderer) {
		throw new Error('Params must be renderer');
	}

	const chromiumOptions =
		insideFunctionSpecifics.normalizeChromiumOptions?.({
			chromiumOptions: params.chromiumOptions,
			logLevel: params.logLevel,
		}) ?? params.chromiumOptions;

	if (params.launchFunctionConfig.version !== VERSION) {
		throw new Error(
			`The version of the function that was specified as "rendererFunctionName" is ${VERSION} but the version of the function that invoked the render is ${params.launchFunctionConfig.version}. Please make sure that the version of the function that is specified as "rendererFunctionName" is the same as the version of the function that is invoked.`,
		);
	}

	const inputPropsPromise = decompressInputProps({
		bucketName: params.bucketName,
		expectedBucketOwner: options.expectedBucketOwner,
		region: insideFunctionSpecifics.getCurrentRegionInFunction(),

View on GitHub (pinned to b2f4e34732)

Solutions

  1. Ensure the renderer Lambda is only invoked by the launch function with a payload of type ServerlessRoutines.renderer
  2. Call renderMediaOnLambda()/renderOnLambda instead of invoking the Lambda directly so the correct payload is built
  3. Check that rendererFunctionName points at the renderer function, not the orchestrator function
  4. Inspect the invoking payload's `type` field in CloudWatch logs and fix the caller

Example fix

// before (manual invoke)
await lambda.send(new InvokeCommand({ FunctionName: rendererFn, Payload: JSON.stringify({ type: 'launch', ... }) }));
// after
await renderMediaOnLambda({ functionName: rendererFn, serveUrl, composition, region });
Defensive patterns

Strategy: validation

Validate before calling

if (payload.type === 'renderer') {
  await invokeRenderer(payload);
}

Type guard

const isRendererParams = (p: unknown): p is RendererParams =>
  typeof p === 'object' && p !== null && (p as {type?: string}).type === 'renderer';

Try / catch

try {
  await renderHandler({ inputProps, ... });
} catch (e) {
  if ((e as Error).message === 'Params must be renderer') {
    // wrong payload routed to renderer function; fix caller
  } else { throw e; }
}

Prevention

When it happens

Trigger: Invoking the renderer function's renderHandler with a payload whose `type` field is not 'renderer' — e.g. sending a launch routine payload to the renderer function, hand-crafted Lambda invocations, or wrongly wired sqs/lambda routing.

Common situations: Manually invoking the Lambda for testing with wrong payload; mixing up launch vs renderer function names so a launch payload reaches rendererHandler; custom orchestration code that constructs its own params.

Understand the failure class

Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.

Related errors


AI-assisted analysis of remotion-dev/remotion@b2f4e34732 (2026-09-09). Data as JSON: /api/errors/9a6a00f87b806b00. Report an issue: GitHub.