Remotion Lambda — Parallel Rendering Thousands of Videos on AWS
Serverless video pipeline where Lambda functions distribute frame rendering and combine on S3
The limitations of local rendering are clear. You can only parallelize up to the number of CPU cores, and sequential rendering of 1000 videos takes hours.
Remotion Lambda solves this serverlessly.
Rendering process: When you request one video (e.g., 900 frames), the orchestrator Lambda splits it into chunks (e.g., 20 × 45 frames). Each chunk is rendered simultaneously by separate Lambda functions, uploading partial videos to S3. When all chunks complete, a final Lambda combines them with FFmpeg.
Cost structure: Lambda charges by execution time (GB-seconds), so 10 Lambdas running 1 minute each costs the same as 1 Lambda running 10 minutes. Speed is 10x faster but cost is identical.
Limitations: Lambda has max 10GB memory and 15-minute execution time limits. Long 4K videos need smaller chunk sizes. Remotion Lambda also requires a paid license (Company License).
How It Works
Provision Lambda function + S3 bucket + IAM role to AWS with remotion lambda deploy
Request rendering with renderMediaOnLambda() → orchestrator Lambda splits into chunks
N worker Lambdas render each chunk simultaneously → upload partial videos to S3
All chunks complete → combiner Lambda concatenates chunks with FFmpeg for final MP4
Poll progress with getRenderProgress() → return S3 download URL on completion
Pros
- ✓ Horizontal scaling: linearly reduce rendering time by increasing Lambda concurrency
- ✓ Cost efficient: zero cost when idle, charged per GB-second only during rendering
- ✓ No infra management: AWS handles server provisioning, scaling, patching
Cons
- ✗ Paid license required: Remotion Company License (annual billing)
- ✗ AWS lock-in: Lambda + S3 + IAM setup is complex, other clouds not supported
- ✗ Cold start: first rendering adds several seconds of Lambda warm-up time