Skip to content

🎥 Make videos programmatically with React

Next.js templates: Fix disk sizes not applying to function deploys

Jonny Burger6f7c924d2eb1
diff --git a/packages/template-next-app-tailwind/config.mjs b/packages/template-next-app-tailwind/config.mjs
index af7f057cf0..71e8e63e86 100644
--- a/packages/template-next-app-tailwind/config.mjs
+++ b/packages/template-next-app-tailwind/config.mjs
@@ -8,5 +8,5 @@ export const REGION = "us-east-1";
export const SITE_NAME = "my-next-app";
export const RAM = 3009;
-export const DISK = 2048;
+export const DISK = 10240;
export const TIMEOUT = 240;
diff --git a/packages/template-next-app-tailwind/deploy.mjs b/packages/template-next-app-tailwind/deploy.mjs
index 9105f916a8..6c4358522f 100644
--- a/packages/template-next-app-tailwind/deploy.mjs
+++ b/packages/template-next-app-tailwind/deploy.mjs
@@ -5,7 +5,7 @@ import {
} from "@remotion/lambda";
import dotenv from "dotenv";
import path from "path";
-import { RAM, REGION, SITE_NAME, TIMEOUT } from "./config.mjs";
+import { DISK, RAM, REGION, SITE_NAME, TIMEOUT } from "./config.mjs";
import { webpackOverride } from "./remotion/webpack-override.mjs";
console.log("Selected region:", REGION);
@@ -13,11 +13,11 @@ dotenv.config();
if (!process.env.AWS_ACCESS_KEY_ID && !process.env.REMOTION_AWS_ACCESS_KEY_ID) {
console.log(
- 'The environment variable "REMOTION_AWS_ACCESS_KEY_ID" is not set.'
+ 'The environment variable "REMOTION_AWS_ACCESS_KEY_ID" is not set.',
);
console.log("Lambda renders were not set up.");
console.log(
- "Complete the Lambda setup: at https://www.remotion.dev/docs/lambda/setup"
+ "Complete the Lambda setup: at https://www.remotion.dev/docs/lambda/setup",
);
process.exit(0);
}
@@ -26,11 +26,11 @@ if (
!process.env.REMOTION_AWS_SECRET_ACCESS_KEY
) {
console.log(
- 'The environment variable "REMOTION_REMOTION_AWS_SECRET_ACCESS_KEY" is not set.'
+ 'The environment variable "REMOTION_REMOTION_AWS_SECRET_ACCESS_KEY" is not set.',
);
console.log("Lambda renders were not set up.");
console.log(
- "Complete the Lambda setup: at https://www.remotion.dev/docs/lambda/setup"
+ "Complete the Lambda setup: at https://www.remotion.dev/docs/lambda/setup",
);
process.exit(0);
}
@@ -43,10 +43,11 @@ const { functionName, alreadyExisted: functionAlreadyExisted } =
memorySizeInMb: RAM,
region: REGION,
timeoutInSeconds: TIMEOUT,
+ diskSizeInMb: DISK,
});
console.log(
functionName,
- functionAlreadyExisted ? "(already existed)" : "(created)"
+ functionAlreadyExisted ? "(already existed)" : "(created)",
);
process.stdout.write("Ensuring bucket... ");
@@ -56,7 +57,7 @@ const { bucketName, alreadyExisted: bucketAlreadyExisted } =
});
console.log(
bucketName,
- bucketAlreadyExisted ? "(already existed)" : "(created)"
+ bucketAlreadyExisted ? "(already existed)" : "(created)",
);
process.stdout.write("Deploying site... ");
diff --git a/packages/template-next-app/config.mjs b/packages/template-next-app/config.mjs
index af7f057cf0..71e8e63e86 100644
--- a/packages/template-next-app/config.mjs
+++ b/packages/template-next-app/config.mjs
@@ -8,5 +8,5 @@ export const REGION = "us-east-1";
export const SITE_NAME = "my-next-app";
export const RAM = 3009;
-export const DISK = 2048;
+export const DISK = 10240;
export const TIMEOUT = 240;
diff --git a/packages/template-next-app/deploy.mjs b/packages/template-next-app/deploy.mjs
index 83bccc7de4..a8cbca25ba 100644
--- a/packages/template-next-app/deploy.mjs
+++ b/packages/template-next-app/deploy.mjs
@@ -5,18 +5,18 @@ import {
} from "@remotion/lambda";
import dotenv from "dotenv";
import path from "path";
-import { RAM, REGION, SITE_NAME, TIMEOUT } from "./config.mjs";
+import { DISK, RAM, REGION, SITE_NAME, TIMEOUT } from "./config.mjs";
console.log("Selected region:", REGION);
dotenv.config();
if (!process.env.AWS_ACCESS_KEY_ID && !process.env.REMOTION_AWS_ACCESS_KEY_ID) {
console.log(
- 'The environment variable "REMOTION_AWS_ACCESS_KEY_ID" is not set.'
+ 'The environment variable "REMOTION_AWS_ACCESS_KEY_ID" is not set.',
);
console.log("Lambda renders were not set up.");
console.log(
- "Complete the Lambda setup: at https://www.remotion.dev/docs/lambda/setup"
+ "Complete the Lambda setup: at https://www.remotion.dev/docs/lambda/setup",
);
process.exit(0);
}
@@ -25,11 +25,11 @@ if (
!process.env.REMOTION_AWS_SECRET_ACCESS_KEY
) {
console.log(
- 'The environment variable "REMOTION_REMOTION_AWS_SECRET_ACCESS_KEY" is not set.'
+ 'The environment variable "REMOTION_REMOTION_AWS_SECRET_ACCESS_KEY" is not set.',
);
console.log("Lambda renders were not set up.");
console.log(
- "Complete the Lambda setup: at https://www.remotion.dev/docs/lambda/setup"
+ "Complete the Lambda setup: at https://www.remotion.dev/docs/lambda/setup",
);
process.exit(0);
}
@@ -42,10 +42,11 @@ const { functionName, alreadyExisted: functionAlreadyExisted } =
memorySizeInMb: RAM,
region: REGION,
timeoutInSeconds: TIMEOUT,
+ diskSizeInMb: DISK,
});
console.log(
functionName,
- functionAlreadyExisted ? "(already existed)" : "(created)"
+ functionAlreadyExisted ? "(already existed)" : "(created)",
);
process.stdout.write("Ensuring bucket... ");
@@ -55,7 +56,7 @@ const { bucketName, alreadyExisted: bucketAlreadyExisted } =
});
console.log(
bucketName,
- bucketAlreadyExisted ? "(already existed)" : "(created)"
+ bucketAlreadyExisted ? "(already existed)" : "(created)",
);
process.stdout.write("Deploying site... ");
diff --git a/packages/template-next-pages/config.mjs b/packages/template-next-pages/config.mjs
index af7f057cf0..71e8e63e86 100644
--- a/packages/template-next-pages/config.mjs
+++ b/packages/template-next-pages/config.mjs
@@ -8,5 +8,5 @@ export const REGION = "us-east-1";
export const SITE_NAME = "my-next-app";
export const RAM = 3009;
-export const DISK = 2048;
+export const DISK = 10240;
export const TIMEOUT = 240;
diff --git a/packages/template-next-pages/deploy.mjs b/packages/template-next-pages/deploy.mjs
index 83bccc7de4..a8cbca25ba 100644
--- a/packages/template-next-pages/deploy.mjs
+++ b/packages/template-next-pages/deploy.mjs
@@ -5,18 +5,18 @@ import {
} from "@remotion/lambda";
import dotenv from "dotenv";
import path from "path";
-import { RAM, REGION, SITE_NAME, TIMEOUT } from "./config.mjs";
+import { DISK, RAM, REGION, SITE_NAME, TIMEOUT } from "./config.mjs";
console.log("Selected region:", REGION);
dotenv.config();
if (!process.env.AWS_ACCESS_KEY_ID && !process.env.REMOTION_AWS_ACCESS_KEY_ID) {
console.log(
- 'The environment variable "REMOTION_AWS_ACCESS_KEY_ID" is not set.'
+ 'The environment variable "REMOTION_AWS_ACCESS_KEY_ID" is not set.',
);
console.log("Lambda renders were not set up.");
console.log(
- "Complete the Lambda setup: at https://www.remotion.dev/docs/lambda/setup"
+ "Complete the Lambda setup: at https://www.remotion.dev/docs/lambda/setup",
);
process.exit(0);
}
@@ -25,11 +25,11 @@ if (
!process.env.REMOTION_AWS_SECRET_ACCESS_KEY
) {
console.log(
- 'The environment variable "REMOTION_REMOTION_AWS_SECRET_ACCESS_KEY" is not set.'
+ 'The environment variable "REMOTION_REMOTION_AWS_SECRET_ACCESS_KEY" is not set.',
);
console.log("Lambda renders were not set up.");
console.log(
- "Complete the Lambda setup: at https://www.remotion.dev/docs/lambda/setup"
+ "Complete the Lambda setup: at https://www.remotion.dev/docs/lambda/setup",
);
process.exit(0);
}
@@ -42,10 +42,11 @@ const { functionName, alreadyExisted: functionAlreadyExisted } =
memorySizeInMb: RAM,
region: REGION,
timeoutInSeconds: TIMEOUT,
+ diskSizeInMb: DISK,
});
console.log(
functionName,
- functionAlreadyExisted ? "(already existed)" : "(created)"
+ functionAlreadyExisted ? "(already existed)" : "(created)",
);
process.stdout.write("Ensuring bucket... ");
@@ -55,7 +56,7 @@ const { bucketName, alreadyExisted: bucketAlreadyExisted } =
});
console.log(
bucketName,
- bucketAlreadyExisted ? "(already existed)" : "(created)"
+ bucketAlreadyExisted ? "(already existed)" : "(created)",
);
process.stdout.write("Deploying site... ");