Skip to content

🎥 Make videos programmatically with React

improve docs

Jonny Burgerc520a775c27d
diff --git a/packages/docs/docs/lambda/checklist.md b/packages/docs/docs/lambda/checklist.md
index 2b212dcd1e..ef52072074 100644
--- a/packages/docs/docs/lambda/checklist.md
+++ b/packages/docs/docs/lambda/checklist.md
@@ -31,7 +31,7 @@ Make sure your AWS permissions only have as many permissions as needed and store
Familiarize yourself with the [AWS burst limit](https://docs.aws.amazon.com/lambda/latest/dg/invocation-scaling.html). Essentially, you need to avoid a quick spike in video renders that will cause the burst limit to take effect. If you need to scale beyond the burst limit, consider scaling across multiple regions as the burst limit only applies for a certain region. Another strategy to consider is creating multiple sub-accounts in your AWS organization as the burst limit only affects a single account.
-## AWS payload limit
+### AWS payload limit
The maximum payload for invoking a Lambda function is 256KB. Ensure that in your application, the `inputProps` payload does not exceed this amount and introduce validation and error handling if necessary.
diff --git a/packages/docs/docs/lambda/cli-functions.md b/packages/docs/docs/lambda/cli-functions.md
deleted file mode 100644
index a793a7e740..0000000000
--- a/packages/docs/docs/lambda/cli-functions.md
+++ /dev/null
@@ -1,8 +0,0 @@
----
-id: cli-functions
-sidebar_label: functions
-title: "npx remotion lambda functions"
-slug: /lambda/cli/functions
----
-
-TODO
diff --git a/packages/docs/docs/lambda/cli/functions.md b/packages/docs/docs/lambda/cli/functions.md
new file mode 100644
index 0000000000..53c3e3f707
--- /dev/null
+++ b/packages/docs/docs/lambda/cli/functions.md
@@ -0,0 +1,112 @@
+---
+id: functions
+sidebar_label: functions
+title: "npx remotion lambda functions"
+slug: /lambda/cli/functions
+---
+
+import {DefaultMemorySize} from '../../../components/lambda/default-memory-size';
+import {DefaultTimeout} from '../../../components/lambda/default-timeout';
+
+The `npx remotion lambda functions` command allows you to deploy, view and delete AWS lambda functions that can render videos.
+
+You only need one function per AWS region and Remotion version. Suggested reading: [Do I need to deploy a function for each render?](/docs/lambda/faq#do-i-need-to-deploy-a-function-for-each-render)
+
+## deploy
+
+```
+npx remotion lambda functions deploy
+```
+
+Creates a new function in your AWS account. If a function in the same region, from the same Remotion version, with the same amount of memory and the same timeout already exists, the name of the already deployed function will be returned instead.
+
+By default, a CloudWatch Log Group will be created that will log debug information to CloudWatch that you can consult in the case something is going wrong.
+
+<details>
+<summary>
+Example output
+</summary>
+<pre>
+Region = eu-central-1, Memory = 2048MB, Timeout = 120sec, Version = 2021-12-17<br/>
+Deployed as remotion-render-2021-12-17-2048mb-120sec
+<br/>
+
+</pre>
+</details>
+
+### `--memory`
+
+Memory size in megabytes. Default: <DefaultMemorySize /> MB.
+
+### `--timeout`
+
+Memory size in megabytes. Default: <DefaultTimeout /> seconds.
+
+### `--disable-cloudwatch`
+
+Does not create a CloudWatch log group.
+
+### `--quiet`, `-q`
+
+Only logs the function name.
+
+## ls
+
+```
+npx remotion lambda functions ls
+```
+
+Lists the functions that you have deployed to AWS in the [selected region](/docs/lambda/region-selection).
+
+<details>
+<summary>
+Example output
+</summary>
+<pre>
+6 functions in the eu-central-1 region<br/>
+Name Version Memory (MB) Timeout (sec) <br/>
+remotion-render-2021-12-16-2048mb-240sec 2021-12-16 2048 240 <br/>
+remotion-render-2021-12-17-2048mb-120sec 2021-12-17 2048 120 <br/>
+remotion-render-2021-12-15-2048mb-240sec 2021-12-15 2048 240
+<br/>
+
+</pre>
+</details>
+
+### `--quiet`, `-q`
+
+Prints only the function names in a space-separated list. If no functions exist, prints `()`
+
+## rm
+
+```
+npx remotion lambda functions rm remotion-render-2021-12-16-2048mb-240sec
+```
+
+Removes one or more functions from your AWS infrastructure. Pass a space-separated list of functions you'd like to delete.
+
+<details>
+<summary>
+Example output
+</summary>
+<pre>
+<br/>
+Function name: remotion-render-2021-12-16-2048mb-240sec<br/>
+Memory: 2048MB<br/>
+Timeout: 120sec<br/>
+Version: 2021-12-16<br/>
+Delete? (Y/n): Y<br/>
+Deleted!
+<br/>
+
+</pre>
+</details>
+
+### `--yes`, `-y`
+
+Skips confirmation.
+
+## See also
+
+- [Do I need to deploy a function for each render?](/docs/lambda/faq#do-i-need-to-deploy-a-function-for-each-render)
+- [Setup guide](/docs/lambda/setup)
diff --git a/packages/docs/docs/lambda/cli-render.md b/packages/docs/docs/lambda/cli/render.md
similarity index 99%
rename from packages/docs/docs/lambda/cli-render.md
rename to packages/docs/docs/lambda/cli/render.md
index 637d419e3b..266d0b60ec 100644
--- a/packages/docs/docs/lambda/cli-render.md
+++ b/packages/docs/docs/lambda/cli/render.md
@@ -1,5 +1,5 @@
---
-id: cli-render
+id: render
sidebar_label: render
title: "npx remotion lambda render"
slug: /lambda/cli/render
diff --git a/packages/docs/docs/lambda/cli-sites.md b/packages/docs/docs/lambda/cli/sites.md
similarity index 99%
rename from packages/docs/docs/lambda/cli-sites.md
rename to packages/docs/docs/lambda/cli/sites.md
index 255a1fea8e..9e75f41ae9 100644
--- a/packages/docs/docs/lambda/cli-sites.md
+++ b/packages/docs/docs/lambda/cli/sites.md
@@ -1,5 +1,5 @@
---
-id: cli-sites
+id: sites
sidebar_label: sites
title: "npx remotion lambda sites"
slug: /lambda/cli/sites
diff --git a/packages/docs/docs/lambda/cli-still.md b/packages/docs/docs/lambda/cli/still.md
similarity index 87%
rename from packages/docs/docs/lambda/cli-still.md
rename to packages/docs/docs/lambda/cli/still.md
index d913942196..4787d193db 100644
--- a/packages/docs/docs/lambda/cli-still.md
+++ b/packages/docs/docs/lambda/cli/still.md
@@ -1,5 +1,5 @@
---
-id: cli-still
+id: still
sidebar_label: still
title: "npx remotion lambda still"
slug: /lambda/cli/still
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index f01129833b..2e34031316 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -49,10 +49,10 @@ module.exports = {
label: "CLI",
items: [
"lambda/cli",
- "lambda/cli-sites",
- "lambda/cli-functions",
- "lambda/cli-render",
- "lambda/cli-still",
+ "lambda/cli/sites",
+ "lambda/cli/functions",
+ "lambda/cli/render",
+ "lambda/cli/still",
],
},
"lambda/setup",