@studio-dev/vsdk-render-lambda
v0.0.8
Published
Render adapter for @studio-dev/vsdk that drives Remotion Lambda — deploy, render, progress, webhooks, and framework-agnostic HTTP handlers.
Readme
@studio-dev/vsdk-render-lambda
Render adapter for the Studio Video SDK (@studio-dev/vsdk) that drives Remotion Lambda.
Drop into any Node 18+ backend — mounts in Hono, Next.js, Express, Fastify, NestJS, Bun, and
Cloudflare Workers.
Install
# Runtime — every server that renders or polls
pnpm add @studio-dev/vsdk-render-lambda @remotion/lambda-client
# Deploy — only on the machine that runs `studio-sdk lambda deploy`
pnpm add -D @remotion/lambdaThree-step setup
1. Define your config:
import { defineConfig } from '@studio-dev/vsdk-render-lambda/config'
export default defineConfig({
lambda: {
region: 'eu-west-2',
siteName: 'my-app',
preset: 'standard',
},
})2. Deploy the Lambda function + Remotion site. The CLI ships in the same package — install once and run via your package manager:
pnpm exec studio-sdk lambda deploy
# npm exec studio-sdk -- lambda deploy
# yarn studio-sdk lambda deploy
# bunx studio-sdk lambda deployOr as a package.json script:
{
"scripts": { "lambda:deploy": "studio-sdk lambda deploy" }
}For one-shot use without installing, the -p / --package flag is required because the bin
name (studio-sdk) is intentionally separate from the package name:
pnpm dlx -p @studio-dev/vsdk-render-lambda studio-sdk lambda deploy
npx --package=@studio-dev/vsdk-render-lambda -- studio-sdk lambda deployThe deploy output prints a functionName and serveUrl — paste those into your runtime env.
3. Mount the render API. Web-standard handler — works in every modern framework:
import { createLambdaRenderer } from '@studio-dev/vsdk-render-lambda'
const renderer = createLambdaRenderer({
region: 'eu-west-2',
functionName: process.env.VSDK_FUNCTION_NAME!,
serveUrl: process.env.VSDK_SERVE_URL!,
})
const handler = renderer.createWebHandler({ basePath: '/api/render' })
export const GET = (req: Request) => handler(req)
export const POST = (req: Request) => handler(req)
export const DELETE = (req: Request) => handler(req)For Express / Fastify / NestJS, wrap the handler with toNodeListener from
@studio-dev/vsdk-render-lambda/node — see the Framework integration
page in the docs.
What this package gives you
createLambdaRenderer(config)— render, render-still, progress, cancel, presign, cost- Web-standard HTTP handler factory with auth + lifecycle hooks
- Signature-verified webhook helpers
studio-sdkCLI withdeploy,teardown,ls,policy,regions,doctorsubcommandsdefineConfig+ auto-discoveredstudio.config.{ts,js,mjs,cjs,json}- Light-client / heavy-deploy split — runtime servers only pull the light dependency
Docs
Full documentation is hosted at https://studio-dev.dev/docs/render-lambda — covers quickstart, deploy, rendering options, framework integration (Hono / Next / Express / Fastify / Nest / Bun / Workers), webhooks, IAM permissions, regions, concurrency, custom layers, cost tuning, troubleshooting, and a full API reference.
