Skip to content

🎥 Make videos programmatically with React

Better link how people use R2 in combination with Remotion

Jonny Burger3e60dcf52f91
diff --git a/packages/docs/docs/lambda/data-transfer-cost.mdx b/packages/docs/docs/lambda/data-transfer-cost.mdx
index 3766deb054..33c1b7a454 100644
--- a/packages/docs/docs/lambda/data-transfer-cost.mdx
+++ b/packages/docs/docs/lambda/data-transfer-cost.mdx
@@ -18,11 +18,18 @@ No, with the default settings, since the transfer happens over HTTP, AWS counts
## Option 1: Use an alternate CDN for storing assets
-Many people use Cloudflare R2 to store their big assets instead.
+Many Remotion users use Cloudflare R2 to store their big assets instead.
This is easy to achieve - simply put the assets in a Cloudflare R2 bucket and reference them using the HTTP URL that you get.
Cloudflare does not charge for data transfer, so this is a great way to reduce the cost.
+Make sure to disable the Bot fight mode for R2:
+
+- Go to Security of your domain -> Settings -> disable "Bot fight mode"
+- Ensure you use your own domain on the bucket
+
+This ensures no traffic gets blocked when the Lambda function uses a headless browser to load the assets.
+
## Option 2: Enable VPC endpoints
You can with some configuration set up a VPC for the Lambda function.
@@ -35,3 +42,7 @@ Refer to these [notes](https://github.com/remotion-dev/remotion/issues/3817#issu
- You still pay a flat fee per request.
- Setting up a VPC endpoint might restrict other network traffic.
- We do not have recommendations yet for how to configure the VPC endpoint.
+
+## See also
+
+- [Cost example](/docs/lambda/cost-example)
diff --git a/packages/docs/docs/lambda/r2.mdx b/packages/docs/docs/lambda/r2.mdx
index b21a249eec..dcd41d7001 100644
--- a/packages/docs/docs/lambda/r2.mdx
+++ b/packages/docs/docs/lambda/r2.mdx
@@ -43,6 +43,10 @@ const {bucketName, renderId, cloudWatchMainLogs} = await renderMediaOnLambda({
});
```
+## Storing the site and assets in R2
+
+[Many Remotion users store](/docs/lambda/data-transfer-cost#option-1-use-an-alternate-cdn-for-storing-assets) their [bundle](/docs/terminology/bundle) and any assets such as input videos in R2, in order to avoid [S3 bandwidth costs](/docs/lambda/data-transfer-cost).
+
## See also
- [Using Remotion Lambda with Supabase](/docs/lambda/supabase)