FAQ
Some commonly asked questions about Remotion Lambda.
Is Lambda self-hosted?
Yes, you host Remotion Lambda in your own AWS account. Remotion does not offer a hosted rendering solution at this time.
Do I need to deploy a function for each render?
No, in general you only need to deploy one function and it will be capable of rendering multiple videos, even across different projects.
There are three exceptions when it is possible to deploy multiple functions:
- If you are using multiple regions, you need to deploy a function for each region.
- If you are upgrading to a newer version of Remotion Lambda, you need to deploy a new function. You can then run the new and the old function side-by-side. The
@remotion/lambda
CLI will always choose the function in your AWS account that has the same version as the client package. If you use thegetFunctions()
Node.JS API, set thecompatibleOnly
flag totrue
to filter out functions that don't match the version of the@remotion/lambda
package. - If you are deploying a function with a different memory size, disk size or timeout, a new function can be created. However, currently if multiple suitable functions are available, Remotion will choose one at random. So you should only use this strategy to change the parameters of the function without causing downtime.
Do I need to create multiple buckets?
Only one bucket per region is recommended.
Do I need to deploy multiple sites?
You can deploy one site and use it for as many renders as you need. If you have multiple sites, you can deploy all of them and reuse the same Lambda function.
What if I want to render longer videos?
You don't need to worry about the timeout of a Lambda function because Remotion splits the video in many parts and renders them in parallel. However, you need to be aware of the storage limits that may not be exceeded. See: Disk size
Why are you not using Amazon EFS?
We have evaluated Amazon Elastic File System (EFS) and we found the speed benefits of EFS are not substantial enough to warrant the increased complexity - for EFS to be integrated, VPC and security groups need to be created which will disable public internet access. To restore public internet access, a persistent EC2 instance needs to be created for proxying the traffic, negating many benefits of Lambda.
How much does Remotion Lambda cost?
There are two cost components: The Remotion licensing fee (see pricing, only applies if you are a company) and the AWS costs. AWS cost is dependant on the amount of memory that you assign to your lambda function. We estimate the Lambda costs for you and report it in the API response.
How can I upgrade/redeploy a Lambda function?
Remotion will look for a version of the lambda function that matches the Node.JS library / CLI.
If you don't rely on the old function anymore, you can first delete all existing functions:
bash
npx remotion lambda functions rmall
bash
npx remotion lambda functions rmall
You can deploy a new function using:
bash
npx remotion lambda functions deploy
bash
npx remotion lambda functions deploy
If you are using the Node.JS APIs, the following APIs are useful: getFunctions()
, deployFunction()
and deleteFunction()
.
Can I modify the code that is run inside the Lambda?
The code that is run inside the Lambda is an executor binary that is provided by Remotion. You cannot write code to run inside the function that Remotion deploys for you, but you can make use of many configuration options and call a Remotion Lambda function from another Lambda function using APIs like renderMediaOnLambda.
The source code of what is run inside a Remotion Lambda function can be found here and forked if necessary. We recommend to reach out to the Remotion team first and check if a fork is really necessary.
Can I make a site private?
When you render a video on Lambda, you specify a Serve URL pointing to a Webpack bundle of Remotion code.
This is a URL that, if known, can be publicly accessed by anyone.
The Lambda function needs to spawn a headless browser and visit this URL in order to render the video.
The items in the bucket cannot be made private because they need to be accessible via URL in the headless browser.
Make sure to not hardcode sensitive data in your code, such as API keys, or user data.
Instead, use the inputProps
and envVariables
options of renderMediaOnLambda()
to pass data during the render.
Those values will never be publicly accessible.
By making your site available under a Serve URL, you may expose your minified React code.
This is normally not a problem, because any website will expose their minified frontend code.
If you would like to make your site more private, you can:
- Use a longer site name that is harder to guess
- Place a
robots.txt
in the root of your bucket with aDisallow: /
rule to prevent crawlers from accessing your site and your site showing up in search results.
Only you can trigger renders on your account
Making the site accessible via a Serve URL will not allow anyone to trigger a Lambda render on your account.
The URL only serves HTML, JavaScript and assets, but does expose access to invoking any computation on your AWS account.