Upgrade your Lambda functions to prevent breakage
import {UserPolicy} from '../../components/lambda/user-permissions.tsx';
On February 24th 2023, a new version of the AWS Lambda Node.JS runtime started rolling out that breaks Remotion Lambda.
Remotion Lambda users are advised to read this document to avoid any downtime.
Problem
Users might see an error:
bash
Error: expected to launch
bash
Error: expected to launch
or
bash
Failed to launch the browser process!TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
bash
Failed to launch the browser process!TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/main/docs/troubleshooting.md
Cause
AWS Lambda has rolled out an update to their Lambda runtime for Node.JS to update it from v14.28
to v14.29
.
This update causes the headless Chromium browser to exit with a SIGBUS
error for a yet unknown reason.
Advisory
We recommend to not deploy any new functions until the issue is resolved as new functions are subject to getting the new runtime.
Since at a later point, AWS will roll out the runtime to any existing functions, we recommend to upgrade to Remotion 3.3.54
or later in the near future and redeploy your functions.
Resolutions
Option 1: v3.3.54
update (recommended)
In Remotion v3.3.54
, Remotion will lock the AWS Lambda Node.JS runtime to v14.28
to prevent this issue from happening.
Locking a runtime on AWS Lambda is only possible since January 23rd, 2023, hence the reason why we are only releasing this update now.
To apply the fix, you need to:
bash
npx remotion upgrade
bash
npx remotion upgrade
lambda
Show full user permissions JSON file for latest Remotion Lambda version
or type in npx remotion lambda policies user
after upgrading Remotion Lambda.
Go to the Users section in the AWS console and overwrite the JSON policy of your Remotion Lambda user with the above copied JSON.
Option 2: Manually update the runtime in the AWS console
Alternatively, for each of your Lambda functions, you can lock the runtime version in the AWS console:
arn:aws:lambda:[region]::runtime:69000d3430a08938bcab71617dffcb8ea551a2cbc36c59f38c52a1ea087e461b
. Replace [region]
with the code for the AWS region (e.g. us-east-1
)
Long-term solution
We have upgraded to a AWS Business support tier and reached out to them to make them aware of the issue and hope to cooperate on a solution soon.
Since it recently became possible to lock the AWS Lambda runtime version, we will be using this option going forward to make Remotion more resilient to future runtime updates.
Questions?
Join our Discord community to get help from the Remotion team and other users.