remotion icon indicating copy to clipboard operation
remotion copied to clipboard

Lambda deployment exceeds 250MB limit in Remotion 4.0.431

Open andreisocaciu opened this issue 9 months ago • 3 comments

Summary

deployFunction() fails with InvalidParameterValueException because the Lambda function + layers exceed the AWS limit. The package is ~6.2 MB over the 250 MB ceiling.

Environment

  • Remotion version: 4.0.431 (upgraded from 4.0.356)
  • Packages: @remotion/lambda, @remotion/bundler, @remotion/renderer, etc.
  • Chromium layer: @sparticuz/chromium ^143.0.0
  • Node.js: v22.14.0
  • OS: macOS (darwin 25.3.0)
  • AWS Region: us-east-1

Exact Error

InvalidParameterValueException: Function code combined with layers exceeds the maximum allowed size of 262144000 bytes. The actual size is 268354806 bytes.
Metric Value
AWS limit 262,144,000 bytes (250 MB)
Actual size 268,354,806 bytes (~256 MB)
Exceeded by ~6.2 MB

Stack Trace

at AwsRestJsonProtocol.handleError (file:///.../node_modules/@remotion/lambda-client/dist/esm/index.mjs:16508:25)
...
at async Object.createFunction (file:///.../node_modules/@remotion/lambda/dist/esm/index.mjs:9633:41)
at async internalDeployFunction (file:///.../node_modules/@remotion/lambda/dist/esm/index.mjs:9988:19)

Steps to Reproduce

  1. Upgrade Remotion packages from 4.0.356 to 4.0.431
  2. Run: node remotion-deploy.mjs
  3. Deployment fails during deployFunction() with the above error

Expected vs Actual

  • Expected: Deployment succeeds within the 250 MB limit.
  • Actual: Deployment fails because package + layers = ~256 MB (~6 MB over limit).

Regression

Deployment previously worked with Remotion 4.0.356. The upgrade to 4.0.431 introduces a package size increase that exceeds the AWS Lambda limit.

andreisocaciu avatar Mar 02 '26 08:03 andreisocaciu

This seems to happen with --runtime-preference=apple-emojis only

JonnyBurger avatar Mar 02 '26 09:03 JonnyBurger

Version 4.0.414 still worked for me even with --runtime-preference=apple-emojis. Does this mean we cannot use those emojis going forward?

andreisocaciu avatar Mar 02 '26 11:03 andreisocaciu

No, it means we're gonna fix it in the next version!

This was just me thinking out loud, thanks for reporting!

JonnyBurger avatar Mar 02 '26 12:03 JonnyBurger