🎥 Make videos programmatically with React
`@remotion/lambda`: Standardize single-function docs
Jonny Burger2a716b37a731
diff --git a/packages/docs/docs/lambda/faq.mdx b/packages/docs/docs/lambda/faq.mdxindex 4be82e1485..8dd5e21183 100644--- a/packages/docs/docs/lambda/faq.mdx+++ b/packages/docs/docs/lambda/faq.mdx@@ -27,7 +27,7 @@ There are three exceptions when it is possible to deploy multiple functions:It depends on the [concurrency limit](/docs/lambda/limits) of your AWS account.Normally, a render uses a launch invocation, renderer invocations, and short progress invocations. The number of renderer invocations depends on the [concurrency](/docs/lambda/concurrency) of the render.-From <AvailableFrom v="4.0.517" inline />, setting `concurrency` to `1` without specifying a `rendererFunctionName` makes the launch invocation render the video directly, so no separate renderer invocation is used. A progress request may briefly use another invocation.+From <AvailableFrom v="4.0.517" inline />, you can set `concurrency` to `1` to render the video on the main function. A progress request may briefly use another invocation.If you exceed the concurrency limit, you will get a `TooManyRequestsException` error from AWS Lambda.diff --git a/packages/docs/docs/lambda/how-lambda-works.mdx b/packages/docs/docs/lambda/how-lambda-works.mdxindex fdc0af0561..5606d591e1 100644--- a/packages/docs/docs/lambda/how-lambda-works.mdx+++ b/packages/docs/docs/lambda/how-lambda-works.mdx@@ -26,7 +26,7 @@ that was passed and runs the <a href="/docs/props-resolution">as the metadata (such as the duration in frames).<br /><Step>4</Step> Based on the determined duration of the video and the <a href="/docs/lambda/concurrency">concurrency-</a>, the video is split into chunks. Normally, a <strong>renderer function</strong> is invoked for each chunk. From <AvailableFrom v="4.0.517" inline />, if <code>concurrency</code> is <code>1</code> and no <a href="/docs/lambda/rendermediaonlambda#rendererfunctionname"><code>rendererFunctionName</code></a> is specified, the main function renders the only chunk itself.<br />+</a>, the video is split into chunks. Normally, a <strong>renderer function</strong> is invoked for each chunk. From <AvailableFrom v="4.0.517" inline />, you can set <code>concurrency</code> to <code>1</code> to render the video on the main function.<br /><Step>5</Step> Separate renderer functions use <a href="https://aws.amazon.com/blogs/compute/introducing-aws-lambda-response-streaming/">AWS Lambda Response Streaming</a> to report progress and send the binary video chunks to the main function. This streaming step is skipped when the main function renders directly.<br />diff --git a/packages/docs/docs/lambda/rendermediaonlambda.mdx b/packages/docs/docs/lambda/rendermediaonlambda.mdxindex 62fdbb5226..216971f3ad 100644--- a/packages/docs/docs/lambda/rendermediaonlambda.mdx+++ b/packages/docs/docs/lambda/rendermediaonlambda.mdx@@ -83,7 +83,7 @@ Specify the number of Lambda functions to use for rendering. This is an alternatThe concurrency is defined as `frameCount / framesPerLambda`. Remotion will automatically calculate the appropriate `framesPerLambda` value based on your concurrency setting.-From <AvailableFrom v="4.0.517" inline />, setting `concurrency` to `1` without specifying a [`rendererFunctionName`](#rendererfunctionname) makes the main function render the video directly. No additional renderer function is invoked.+From <AvailableFrom v="4.0.517" inline />, you can set `concurrency` to `1` to render the video on the main function.Maximum value: 200Minimum value: Depends on video length (must result in `framesPerLambda >= 4`)diff --git a/packages/docs/docs/lambda/troubleshooting/debug.mdx b/packages/docs/docs/lambda/troubleshooting/debug.mdxindex bfc463f93b..2c00269b85 100644--- a/packages/docs/docs/lambda/troubleshooting/debug.mdx+++ b/packages/docs/docs/lambda/troubleshooting/debug.mdx@@ -58,7 +58,7 @@ If your error message reads that the main Lambda function has timed out, it mean- If you use the CLI, add `--log=verbose` to the command. This will print a CloudWatch link to the console.- When using [`renderMediaOnLambda()`](/docs/lambda/rendermediaonlambda), add `logLevel: "verbose"`. Use the returned `cloudWatchLogs` URL for renderer functions and `cloudWatchMainLogs` for the main function.-From <AvailableFrom v="4.0.517" inline />, with `concurrency: 1` and no `rendererFunctionName`, the main function renders directly and there are no separate renderer logs. The CLI prints only the main function link.+From <AvailableFrom v="4.0.517" inline />, you can set `concurrency` to `1` to render the video on the main function. There are no separate renderer logs, and the CLI prints only the main function link.Open this link and log into AWS if needed. A log stream will open.diff --git a/packages/docs/docs/lambda/troubleshooting/rate-limit.mdx b/packages/docs/docs/lambda/troubleshooting/rate-limit.mdxindex 786ffc1b15..f35e225eb2 100644--- a/packages/docs/docs/lambda/troubleshooting/rate-limit.mdx+++ b/packages/docs/docs/lambda/troubleshooting/rate-limit.mdx@@ -31,9 +31,11 @@ By default, the concurrency limit is 1000 functions per region, however in someAccording to AWS, "some accounts" which are new to AWS Lambda might get a very low concurrency limit such as 10 when they first start with AWS Lambda. In that case, increase the limit via the AWS console or the Remotion CLI (see below).-### Render with one function<AvailableFrom v="4.0.517" />+### Render with one function-While waiting for AWS to approve a higher limit, set [`concurrency`](/docs/lambda/rendermediaonlambda#concurrency) to `1`:+From <AvailableFrom v="4.0.517" inline />, you can set `concurrency` to `1` to render the video on the main function.++While waiting for AWS to approve a higher limit, use:```bash title="Terminal"npx remotion lambda render <serve-url> <composition-id> --concurrency=1@@ -52,7 +54,7 @@ await renderMediaOnLambda({});```-If no [`rendererFunctionName`](/docs/lambda/rendermediaonlambda#rendererfunctionname) is specified, the launch function renders the video directly and no renderer function is invoked. A progress request may briefly use one additional invocation.+A progress request may briefly use one additional invocation.This is slower than distributed rendering, but it is useful for testing Remotion Lambda on accounts with a low concurrency limit.diff --git a/packages/docs/docs/terminology/concurrency.mdx b/packages/docs/docs/terminology/concurrency.mdxindex 4f130add96..149fa75eaa 100644--- a/packages/docs/docs/terminology/concurrency.mdx+++ b/packages/docs/docs/terminology/concurrency.mdx@@ -11,7 +11,7 @@ Each Chrome tab renders web content and then screenshots it.**For rendering on Lambda,** concurrency refers to the number of chunks that can be rendered in parallel. Normally, each chunk is handled by a separate Lambda function. You can control the Lambda concurrency using the [`framesPerLambda`](/docs/lambda/rendermediaonlambda#framesperlambda) option.-From <AvailableFrom v="4.0.517" inline />, with `concurrency: 1` and no `rendererFunctionName`, the main function renders the only chunk directly instead of invoking a renderer function.+From <AvailableFrom v="4.0.517" inline />, you can set `concurrency` to `1` to render the video on the main function.Each Lambda function usually opens just a single tab, unless you use the [`concurrencyPerLambda`](/docs/lambda/rendermediaonlambda#concurrencyperlambda) option to increase the amount of tabs per Lambda function.