Skip to content

Instantly share code, notes, and snippets.

@JonnyBurger
Created November 21, 2025 17:32
Show Gist options
  • Select an option

  • Save JonnyBurger/14f320e2d2102cfb81155ea5d26b9ff4 to your computer and use it in GitHub Desktop.

Select an option

Save JonnyBurger/14f320e2d2102cfb81155ea5d26b9ff4 to your computer and use it in GitHub Desktop.
AI-generated docs draft: Lambda rendering issue related to GPU usage and settings.

softrobot - 11/21/2025, 4:02:35 PM

Hi! I'm struggling to get the lambda rendering to work. I followed the setup guide and everything seems to be deployed correctly, with 4096mb memory. I am using the latest 4.0.377 with a simple composition. With verbose logging I see:

INFO Ensured browser is available.
INFO    [openBrowser()] Opening browser: gl = angle, executable = /opt/bin/chromium, enableMultiProcessOnLinux = false
ERROR    Error occurred c$: Protocol error (Target.setDiscoverTargets): Target closed.

What can this be?

jonnyburger - 11/21/2025, 4:56:50 PM

--gl=angle does not work on lambda (requires a GPU), use --gl=swangle instead

the error handling should be a lot better here, I am improving it: remotion-dev/remotion#5981

jonnyburger - 11/21/2025, 5:32:20 PM

ouch yeah indeed. we are doing something stupid here. let me file an issue about this, maybe it's best we automatically switch to swangle in lambda in this case!

softrobot - 11/21/2025, 4:59:53 PM

Aha! Was this the default because I started with the three js template? Thank you! Will try this soon.

Technical Note: Fixing Lambda Rendering Issues

Problem

When attempting to render with lambda, users may encounter an error related to the graphics settings, specifically:

ERROR    Error occurred c$: Protocol error (Target.setDiscoverTargets): Target closed.

This issue typically arises due to the configuration of OpenGL settings that are incompatible with Lambda’s execution environment, which does not support GPU rendering.

Reason

The error we see is often caused by specifying --gl=angle, which requires a GPU. Since Lambda functions do not provide GPU capabilities, we need to change our configuration.

Solution

To resolve this issue, we must switch from --gl=angle to --gl=swangle. The swangle flag enables software rendering, making it compatible with the Lambda environment.

Steps to Fix:

  1. Open your Lambda rendering configuration.
  2. Locate the OpenGL option currently set as --gl=angle.
  3. Change it to --gl=swangle.
  4. Redeploy your function and test the rendering again.

By implementing this change, we should be able to avoid the protocol errors and enable successful rendering on Lambda.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment