Skip to content

🎥 Make videos programmatically with React

write docs

Jonny Burgerec84ade7eece
diff --git a/packages/docs/docs/lambda/bucket-naming.md b/packages/docs/docs/lambda/bucket-naming.md
new file mode 100644
index 0000000000..243786741b
--- /dev/null
+++ b/packages/docs/docs/lambda/bucket-naming.md
@@ -0,0 +1,18 @@
+---
+title: Bucket names in Remotion Lambda
+slug: /lambda/bucket-naming
+sidebar_label: Bucket naming
+crumb: "@remotion/lambda"
+---
+
+Remotion Lambda buckets by default are all prefixed `remotionlambda-` and contain their region.
+
+If you want to change the defaults , it comes with a few disadvantages.
+
+## Using a different bucket names
+
+## Region information in the name
+
+The buckets contain the region in their name. This is because when the list of AWS buckets is obtained through the AWS API, the region is not included in the response. If the region is not in the bucket name, it needs to be queried for each bucket, which is a lot of extra API calls and can slow down the render.
+
+If you set up your buckets with a Remotion version before December 2022, you have bucket names that do not include the region in their name. If you re-setup the buckets, you may get a speed gain and reduced API calls, especially if you have a lot of Remotion buckets across regions.
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index a59b22d420..22948d42b3 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -430,6 +430,7 @@ module.exports = {
"lambda/serverless-framework-integration",
"lambda/sqs",
"lambda/multiple-buckets",
+ "lambda/bucket-naming",
"lambda/optimizing-cost",
"lambda/optimizing-speed",
"lambda/limits",
diff --git a/packages/lambda/src/api/deploy-site.ts b/packages/lambda/src/api/deploy-site.ts
index 2c276e7621..674d46b241 100644
--- a/packages/lambda/src/api/deploy-site.ts
+++ b/packages/lambda/src/api/deploy-site.ts
@@ -26,6 +26,7 @@ export type DeploySiteInput = {
enableCaching?: boolean;
publicDir?: string | null;
rootDir?: string;
+ bypassBucketNameValidation?: boolean;
};
};
@@ -56,7 +57,9 @@ export const deploySite = async ({
region,
}: DeploySiteInput): DeploySiteOutput => {
validateAwsRegion(region);
- validateBucketName(bucketName, {mustStartWithRemotion: true});
+ validateBucketName(bucketName, {
+ mustStartWithRemotion: !options?.bypassBucketNameValidation,
+ });
const siteId = siteName ?? randomHash();
validateSiteName(siteId);