Upgrading Lambda
1. Upgrade all Remotion packages
Upgrade all packages to the newest version (@remotion/lambda, but also remotion, @remotion/cli etc.)
npx remotion upgradeSee npx remotion upgrade.
- "@remotion/bundler": "4.0.0" + "@remotion/bundler": "4.0.1"- "@remotion/renderer": "4.0.0" + "@remotion/renderer": "4.0.1"- "@remotion/lambda": "4.0.0" + "@remotion/lambda": "4.0.1"- "remotion": "4.0.0" + "remotion": "4.0.1"
2. Deploy a new Lambda function
npx remotion lambda functions deploySee npx remotion lambda functions deploy.
This deploys a new function with the latest version. You can keep old functions deployed if they are still in use in production.
3. Update the site
npx remotion lambda sites create src/index.ts --site-name=my-nameSee npx remotion lambda sites create.
Pass --site-name with the name of an existing site to update it.
The URL will stay the same but older functions may not be able to render the updated site.
If you don't pass --site-name, a new site URL will be generated.
You'll need to update the serveUrl parameter in your renderMediaOnLambda() calls.
It is advised that the function, the site and the @remotion/lambda package calling the render are all on the same version.
If the site is on a different version than the function, you may get a version mismatch warning – or if there was a protocol change, renders may fail.
4. Remove old functions
Only do this once the old function is no longer being used in production.
npx remotion lambda functions rm <function-name>See npx remotion lambda functions rm.
Zero-downtime upgrades
If you already shipped Remotion Lambda to production, you can upgrade without incurring any downtime:
- Deploy the new function and create a new site – old functions and sites remain unaffected.
- Update the
@remotion/lambdapackage version, function name andserveUrlin your application. - Ship your application update. From this point, all new renders use the new function + site.
- Once no in-flight renders remain on the old version, remove the old function and site.
Useful commands
- List deployed functions and their versions:
npx remotion lambda functions ls - Find functions matching your installed version: use the
compatibleOnlyparameter. - List deployed sites:
npx remotion lambda sites ls