-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remotion/lambda/client too large to be used in Supabase Edge Functions? #4862
Comments
I'm tagging @laktek who might be interested in this topic. Semi-related, there is some new guidance on Supabase Edge Functions found here: |
You are right, I only tested it locally with the Docker setup... We find that if @remotion/lambda/client is bundled, that is only 6MB though, mainly from the AWS SDKs, we even have a test for it: remotion/packages/it-tests/src/lambda/lambda-browser-bundle.test.ts Lines 38 to 43 in 38ba55e
Therefore, before I investigate this, are you sure that it's not the Supabase Client instead that's making the bundle so big? |
@laktek when you have time, can you review this issue? I tried creating a minimal video to test Remotion Lambda client running on Supabase Edge Functions but I still run into the function size problem when deploying the function. |
@tristanbob Can you share the latest code sample you have with the imports? |
@JonnyBurger Looks like the
Also, tried |
looks like |
I think mainly it's the Also, if you can publish this as a JSR module, Supabase Edge Functions can only pull the files that are actually needed when bundling (unfortunately with npm we have to bundle the whole package) |
Was this new lambda-client package created to help with this problem? #4871 What is the status of that package? Is it ready to be tested? |
@tristanbob Yes, this is for solving this issue. I'll try to get a new release out soon! |
@tristanbob Can you try using |
Problem
The
@remotion/lambda
client package is too large to be used in Supabase Edge Functions, which have a 20MB size limit. When trying to use the Lambda client in a Supabase Edge Function, the bundle size exceeds 34MB, resulting in a 413 error (request entity too large).Feature Request
It would be valuable to have a lightweight version of the Lambda client that can run within Supabase Edge Functions' 20MB limit. This could be achieved by:
Technical Details
Impact
This would enable developers to use Remotion Lambda directly from Edge Functions, simplifying architectures and reducing infrastructure complexity.
Additional Context
Supabase Edge Functions run on Deno and have specific limitations around package size and imports. Supporting this environment would make Remotion more accessible to developers using Supabase's serverless platform.
Error when deploying edge function:
Example Supabase Edge Function
The text was updated successfully, but these errors were encountered: