Lambda
RenderLambda adapter — configuration, runtime behavior, and per-render options.
import { RenderLambda } from "@remocn/render-sdk/lambda";
const adapter = RenderLambda({
region: "us-east-1",
functionName: "remotion-render",
serveUrl: "https://remotionlambda-xxxx.s3.us-east-1.amazonaws.com/sites/my-site/index.html",
});Requires @remotion/lambda as an optional peer dependency. Install it separately:
npm install @remotion/lambdaLambdaConfig
type LambdaConfig = {
region: AwsRegion;
functionName: string;
serveUrl: string;
};| field | required | description |
|---|---|---|
region | yes | AWS region where the Lambda function is deployed. |
functionName | yes | Name of the deployed Remotion Lambda function. |
serveUrl | yes | S3 URL of the deployed Remotion site (from deploySite()). |
Runtime behavior
start()callsrenderMediaOnLambdafrom@remotion/lambda. There is no local queue — AWS Lambda scales horizontally.- State is stateless: the handle encodes
renderId,bucket, andext. NoStateStoreis used or accepted. getState()callsgetRenderProgressfrom@remotion/lambdaand maps the result toRenderState.getUrl()returns the S3outputFileURL fromgetRenderProgress. This isnulluntil the render isdone— callinggetUrl()beforestatus === "done"throwsRenderError("not_found").download()callsfetch(await getUrl())and returnsresponse.bodyas aReadableStream.
Per-render options (LambdaOptions)
type LambdaOptions = {
framesPerLambda?: number;
webhook?: { url: string; secret: string | null };
privacy?: "public" | "private";
outName?: string;
maxRetries?: number;
};Pass these as the second argument to sdk.start(input, options).