🎥 Make videos programmatically with React
restructure lambda docs to separate API and general docs
Jonny Burgerab0ad0bdb1f4
diff --git a/packages/docs/components/TableOfContents/lambda.tsx b/packages/docs/components/TableOfContents/lambda.tsxnew file mode 100644index 0000000000..b64c24da49--- /dev/null+++ b/packages/docs/components/TableOfContents/lambda.tsx@@ -0,0 +1,88 @@+import React from "react";+import { Grid } from "./Grid";+import { TOCItem } from "./TOCItem";++export const TableOfContents: React.FC = () => {+ return (+ <div>+ <Grid>+ <TOCItem link="/docs/lambda/estimate-price">+ <strong>estimatePrice()</strong>+ <div>Estimate the price of a render</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/deploy-function">+ <strong>deployFunction()</strong>+ <div>Create a new function in AWS Lambda</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/delete-function">+ <strong>deleteFunction()</strong>+ <div>Delete a function in AWS Lambda</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/get-function-info">+ <strong>getFunctionInfo()</strong>+ <div>Gets information about a function</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/get-functions">+ <strong>getFunctions()</strong>+ <div>Lists available Remotion Lambda functions</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/delete-site">+ <strong>deleteSite()</strong>+ <div>Delete a bundle from S3</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/deploy-site">+ <strong>deploySite()</strong>+ <div>Bundle and upload a site to S3</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/get-aws-client">+ <strong>getAwsClient()</strong>+ <div>Access the AWS SDK directly</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/get-regions">+ <strong>getRegions()</strong>+ <div>Get all available regions</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/get-sites">+ <strong>getSites()</strong>+ <div>Get all available sites</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/download-media">+ <strong>downloadMedia()</strong>+ <div>Download a render artifact from S3</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/get-user-policy">+ <strong>getUserPolicy()</strong>+ <div>Get the policy JSON for your AWS user</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/get-role-policy">+ <strong>getRolePolicy()</strong>+ <div>Get the policy JSON for your AWS role</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/get-or-create-bucket">+ <strong>getOrCreateBucket()</strong>+ <div>Ensure a Remotion S3 bucket exists</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/get-render-progress">+ <strong>getRenderProgress()</strong>+ <div>Query the progress of a render</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/presign-url">+ <strong>presignUrl()</strong>+ <div>Make a private file public to those with the link</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/render-media-on-lambda">+ <strong>renderMediaOnLambda()</strong>+ <div>Trigger a video or audio render</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/render-still-on-lambda">+ <strong>renderStillOnLambda()</strong>+ <div>Trigger a still render</div>+ </TOCItem>+ <TOCItem link="/docs/lambda/simulate-permissions">+ <strong>simulatePermissions()</strong>+ <div>Ensure permissions are correctly set up</div>+ </TOCItem>+ </Grid>+ </div>+ );+};diff --git a/packages/docs/docs/lambda/installation.md b/packages/docs/docs/lambda/installation.mdnew file mode 100644index 0000000000..8a5b85f566--- /dev/null+++ b/packages/docs/docs/lambda/installation.md@@ -0,0 +1,58 @@+---+title: "@remotion/lambda"+---++import Tabs from '@theme/Tabs';+import TabItem from '@theme/TabItem';+import {TableOfContents} from '../../components/TableOfContents/lambda';++<Tabs+defaultValue="npm"+values={[+{ label: 'npm', value: 'npm', },+{ label: 'yarn', value: 'yarn', },+{ label: 'pnpm', value: 'pnpm', },+]+}>+<TabItem value="npm">++```bash+npm i @remotion/lambda+```++ </TabItem>++ <TabItem value="pnpm">++```bash+pnpm i @remotion/lambda+```++ </TabItem>+ <TabItem value="yarn">++```bash+yarn add @remotion/lambda+```++ </TabItem>++</Tabs>++Also update **all the other Remotion packages** to have the same version: `remotion`, `@remotion/cli` and others.++:::note+Make sure no package version number has a `^` character in front of it as it can lead to a version conflict.+:::++**See the [setup guide](/docs/lambda/setup) for complete instructions on how to get started.**++## APIs++The following Node.JS are available:++<TableOfContents />++## CLI++See [here](/docs/lambda/cli) for a list of CLI commands.diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.jsindex ec0bcbee91..2deabb9ad0 100644--- a/packages/docs/sidebars.js+++ b/packages/docs/sidebars.js@@ -8,7 +8,6 @@ module.exports = {type: "doc",id: "cli/cli",},-collapsed: true,items: ["cli/preview",@@ -16,9 +15,21 @@ module.exports = {"cli/still","cli/compositions",{- type: "link",- href: "/docs/lambda/cli",+ type: "category",label: "lambda",+ link: {+ type: "doc",+ id: "lambda/cli",+ },+ items: [+ "lambda/cli/sites",+ "lambda/cli/functions",+ "lambda/cli/render",+ "lambda/cli/still",+ "lambda/cli/policies",+ "lambda/cli/regions",+ "lambda/cli/quotas",+ ],},"cli/versions","cli/upgrade",@@ -103,81 +114,7 @@ module.exports = {label: "@remotion/player",items: ["player/api"],},- {- type: "category",- label: "@remotion/lambda",- link: {- type: "doc",- id: "lambda",- },- items: [- {- type: "category",- label: "CLI",- link: {- type: "doc",- id: "lambda/cli",- },- items: [- "lambda/cli/sites",- "lambda/cli/functions",- "lambda/cli/render",- "lambda/cli/still",- "lambda/cli/policies",- "lambda/cli/regions",- "lambda/cli/quotas",- ],- },- "lambda/setup",- "lambda/permissions",- "lambda/region-selection",- "lambda/concurrency",- "lambda/runtime",- "lambda/disk-size",- "lambda/faq",- "lambda/light-client",- "lambda/custom-layers",- {- type: "category",- label: "Node.JS APIs",- items: [- "lambda/estimateprice",- "lambda/deployfunction",- "lambda/deletefunction",- "lambda/getfunctioninfo",- "lambda/getfunctions",- "lambda/deletesite",- "lambda/deploysite",- "lambda/getawsclient",- "lambda/getregions",- "lambda/getsites",- "lambda/downloadmedia",- "lambda/getuserpolicy",- "lambda/getrolepolicy",- "lambda/getorcreatebucket",- "lambda/getrenderprogress",- "lambda/presignurl",- "lambda/rendermediaonlambda",- "lambda/renderstillonlambda",- "lambda/simulatepermissions",- ],- },- "lambda/checklist",- {- type: "category",- label: "Troubleshooting",- items: [- "lambda/troubleshooting/permissions",- "lambda/troubleshooting/rate-limit",- "lambda/troubleshooting/unrecognizedclientexception",- "lambda/troubleshooting/bucket-disallows-acl",- ],- },- "lambda/changelog",- "lambda/upgrading",- "lambda/uninstall",- ],- },+{type: "category",label: "@remotion/gif",@@ -204,6 +141,35 @@ module.exports = {"visualize-audio",],},+ {+ type: "category",+ label: "@remotion/lambda",+ link: {+ type: "doc",+ id: "lambda/installation",+ },+ items: [+ "lambda/estimateprice",+ "lambda/deployfunction",+ "lambda/deletefunction",+ "lambda/getfunctioninfo",+ "lambda/getfunctions",+ "lambda/deletesite",+ "lambda/deploysite",+ "lambda/getawsclient",+ "lambda/getregions",+ "lambda/getsites",+ "lambda/downloadmedia",+ "lambda/getuserpolicy",+ "lambda/getrolepolicy",+ "lambda/getorcreatebucket",+ "lambda/getrenderprogress",+ "lambda/presignurl",+ "lambda/rendermediaonlambda",+ "lambda/renderstillonlambda",+ "lambda/simulatepermissions",+ ],+ },{type: "category",label: "@remotion/three",@@ -327,6 +293,39 @@ module.exports = {"player/best-practices",],},+ {+ type: "category",+ label: "Lambda",+ link: {+ type: "doc",+ id: "lambda",+ },+ items: [+ "lambda/setup",+ "lambda/permissions",+ "lambda/region-selection",+ "lambda/concurrency",+ "lambda/runtime",+ "lambda/disk-size",+ "lambda/faq",+ "lambda/light-client",+ "lambda/custom-layers",+ "lambda/checklist",+ {+ type: "category",+ label: "Troubleshooting",+ items: [+ "lambda/troubleshooting/permissions",+ "lambda/troubleshooting/rate-limit",+ "lambda/troubleshooting/unrecognizedclientexception",+ "lambda/troubleshooting/bucket-disallows-acl",+ ],+ },+ "lambda/changelog",+ "lambda/upgrading",+ "lambda/uninstall",+ ],+ },{type: "category",label: "Troubleshooting",