🎥 Make videos programmatically with React
`@remotion/lambda`: Recommend single-function rendering for low quotas
Jonny Burgerb279099e2eba
diff --git a/packages/docs/docs/lambda/setup.mdx b/packages/docs/docs/lambda/setup.mdxindex d77737a125..90c34a6372 100644--- a/packages/docs/docs/lambda/setup.mdx+++ b/packages/docs/docs/lambda/setup.mdx@@ -194,7 +194,7 @@ Check the concurrency limit that AWS has given to your account:npx remotion lambda quotas```-By default, it is `1000` concurrent invocations per region. However, new accounts might have a limit [as low as `10`](/docs/lambda/troubleshooting/rate-limit#new-accounts-using-aws-lambda). Each Remotion render may use as much as 200 functions per render concurrently, so if your assigned limit is very low, [you might want to request an increase right away](/docs/lambda/troubleshooting/rate-limit#request-an-increase).+By default, it is `1000` concurrent invocations per region. However, new accounts might have a limit [as low as `10`](/docs/lambda/troubleshooting/rate-limit#new-accounts-using-aws-lambda). Each Remotion render may use as much as 200 functions per render concurrently, so if your assigned limit is very low, [request an increase](/docs/lambda/troubleshooting/rate-limit#request-an-increase). You can use [single-function rendering](/docs/lambda/troubleshooting/rate-limit#render-with-one-function) while waiting for the increase.## 11. Render a videodiff --git a/packages/docs/docs/lambda/troubleshooting/rate-limit.mdx b/packages/docs/docs/lambda/troubleshooting/rate-limit.mdxindex e4f300c684..786ffc1b15 100644--- a/packages/docs/docs/lambda/troubleshooting/rate-limit.mdx+++ b/packages/docs/docs/lambda/troubleshooting/rate-limit.mdx@@ -31,13 +31,42 @@ 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).-### Workaround+### Render with one function<AvailableFrom v="4.0.517" />-If you want to test Remotion Lambda while you are waiting for AWS to approve a higher concurrency limit, you can pass a higher number to [`framesPerLambda`](/docs/lambda/rendermediaonlambda#framesperlambda).+While waiting for AWS to approve a higher limit, set [`concurrency`](/docs/lambda/rendermediaonlambda#concurrency) to `1`:-For example: If your account currently has a concurrency limit of 10 and you want to render a composition with 900 frames, you can set `framesPerLambda` to `100`.-9 Lambda renderer functions will be spawned: `900 / 100 = 9`.-An additional Lambda function will be spawned for orchestration, meaning a total of 10 Lambda functions will be used, keeping yourself within your limit.+```bash title="Terminal"+npx remotion lambda render <serve-url> <composition-id> --concurrency=1+```++```ts twoslash title="render.ts"+import {renderMediaOnLambda} from '@remotion/lambda/client';++await renderMediaOnLambda({+ region: 'us-east-1',+ functionName: 'remotion-render-bds9aab',+ serveUrl: 'https://example.com',+ composition: 'MyVideo',+ codec: 'h264',+ concurrency: 1,+});+```++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.++This is slower than distributed rendering, but it is useful for testing Remotion Lambda on accounts with a low concurrency limit.++### Use limited distributed rendering++You can also set `concurrency` below your account limit. Leave capacity for the launch function, progress requests, other renders, and unrelated Lambda functions in the same region.++For an account limit of 10, this command uses up to eight renderer functions and one launch function, leaving one invocation available for progress:++```bash title="Terminal"+npx remotion lambda render <serve-url> <composition-id> --concurrency=8+```++Use a lower value if other Lambda workloads share the quota. Request a quota increase for production workloads that need higher concurrency.## See your limits