Skip to content

πŸŽ₯ Make videos programmatically with React

`@remotion/lambda`: Better error message for when memory size over 3008 is not allowed

JonnyBurger390744677363
diff --git a/packages/docs/docs/editor-starter/rendering.mdx b/packages/docs/docs/editor-starter/rendering.mdx
index dd5fb12d50..bfdc1c7bdd 100644
--- a/packages/docs/docs/editor-starter/rendering.mdx
+++ b/packages/docs/docs/editor-starter/rendering.mdx
@@ -49,6 +49,10 @@ For example, if you deploy to Vercel, you can create a `vercel.json` file:
}
```
+:::note
+If you get an error `'MemorySize' value failed to satisfy constraint: Member must have value less than or equal to 3008`, you need to lower the memory size of your Lambda function by changing the [`MEM_SIZE_IN_MB`](https://github.com/search?q=repo%3Aremotion-dev%2Feditor-starter%20MEM_SIZE_IN_MB&type=code) variable to a lower value. You might be on the AWS free tier or have a low concurrency limit, which may hinder your ability to render many videos.
+:::
+
## Rendering
Is very simple: When no item is selected in the Editor Starter, a Render button shows up in the [inspector](/docs/editor-starter/tracks-items-assets#inspectors).
diff --git a/packages/renderer/src/print-useful-error-message.ts b/packages/renderer/src/print-useful-error-message.ts
index a5562cd6bd..5a15ef0f82 100644
--- a/packages/renderer/src/print-useful-error-message.ts
+++ b/packages/renderer/src/print-useful-error-message.ts
@@ -72,10 +72,25 @@ export const printUsefulErrorMessage = (
if (
err.message.includes('Member must have value less than or equal to 3008')
) {
- Log.info({indent, logLevel});
- Log.info(
+ Log.warn({indent, logLevel});
+ Log.warn(
+ {indent, logLevel},
+ 'πŸ’‘ This error indicates that you have a AWS account on the free or basic tier or have been limited by your organization.',
+ );
+ Log.warn(
+ {indent, logLevel},
+ 'Often times this can be solved by adding a credit card, or if already done, by contacting AWS support.',
+ );
+ Log.warn(
+ {
+ indent,
+ logLevel,
+ },
+ 'Alternatively, you can decrease the memory size of your Lambda function to a value below 3008 MB. See: https://www.remotion.dev/docs/lambda/runtime#core-count--vcpus',
+ );
+ Log.warn(
{indent, logLevel},
- 'πŸ’‘ This error indicates that you have a AWS account on the free tier or have been limited by your organization. Often times this can be solved by adding a credit card. See also: https://repost.aws/questions/QUKruWYNDYTSmP17jCnIz6IQ/questions/QUKruWYNDYTSmP17jCnIz6IQ/unable-to-set-lambda-memory-over-3008mb',
+ 'See also: https://repost.aws/questions/QUKruWYNDYTSmP17jCnIz6IQ/questions/QUKruWYNDYTSmP17jCnIz6IQ/unable-to-set-lambda-memory-over-3008mb',
);
}