Skip to content

🎥 Make videos programmatically with React

update documentation

Jonny Burgerf0c233cfd32f
diff --git a/packages/docs/docs/lambda-changelog.md b/packages/docs/docs/lambda-changelog.md
new file mode 100644
index 0000000000..3365b57e2e
--- /dev/null
+++ b/packages/docs/docs/lambda-changelog.md
@@ -0,0 +1,24 @@
+---
+id: lambda-changelog
+title: Changelog
+slug: /lambda/changelog
+---
+
+Keep track of changes to the APIs of Remotion Lambda here.
+
+## How to upgrade
+
+1. Get the newest version from the `#lambda` Discord channel.
+1. Upgrade all packages to the newest version (`@remotion/lambda`, but also `remotion`, `@remotion/cli` etc.)
+1. Remove all existing lambdas: `npx remotion-lambda functions ls` and then `npx remotion-lambda functions rm <function-name>`
+1. Redeploy your function: `npx remotion lambda functions deploy`
+1. Migrate according to the changelog below:
+
+## July 6th, 2021
+
+- You can now use `npx remotion lambda` instead of `npx remotion-lambda`.
+- CLI supports the `-y` ('yes') flag for skipping confirmation of destructive commands.
+- Stability, memory management and reliability improved
+- Lambda runtime and Region selection now documented
+- `renderVideoOnLambda()` and `getRenderProgress` now documented.
+- `deployLambda()` has been renamed to `deployFunction()`
diff --git a/packages/docs/docs/lambda-cli.md b/packages/docs/docs/lambda-cli.md
index 321d966733..389b0fb812 100644
--- a/packages/docs/docs/lambda-cli.md
+++ b/packages/docs/docs/lambda-cli.md
@@ -5,11 +5,13 @@ title: "@remotion/lambda - CLI"
slug: /lambda/cli
---
-You can get a list of all commands using `npx remotion-lambda --help`.
+You can get a list of all commands using `npx remotion lambda --help`.
## Global options
-You can specify `--region` to select an AWS region: For example:
+### `--region`
+
+Selects an AWS region: For example:
```console
--region=eu-central-1
@@ -17,6 +19,10 @@ You can specify `--region` to select an AWS region: For example:
The default region is `us-east-1`. You may also set a `AWS_REGION` environment variable directly or via `.env` file.
+### `--yes`, `-y`
+
+Skips confirmation when doing a destructive action.
+
## sites
### create
@@ -24,7 +30,7 @@ The default region is `us-east-1`. You may also set a `AWS_REGION` environment v
Uploads a Remotion project to an S3 bucket. You will get a URL which you can pass to the `render` command to render the video.
```console
-npx remotion-lambda sites create src/index.ts
+npx remotion lambda sites create src/index.ts
```
### ls
@@ -32,7 +38,7 @@ npx remotion-lambda sites create src/index.ts
Lists the sites uploaded to the S3 buckets
```console
-npx remotion-lambda sites ls
+npx remotion lambda sites ls
```
### rm
@@ -40,7 +46,7 @@ npx remotion-lambda sites ls
Deletes a site from an S3 bucket.
```console
-npx remotion-lambda sites rm f87nffa
+npx remotion lambda sites rm f87nffa
```
## policies
@@ -52,7 +58,7 @@ Deals with AWS policy documents, generating and validating policies that need to
Print the suggested policy to be applied to the user that is attached to the access token.
```
-npx remotion-lambda policies user
+npx remotion lambda policies user
```
### role
@@ -60,7 +66,7 @@ npx remotion-lambda policies user
Print the suggested policy to be applied to the role that is attached to the lambda function.
```
-npx remotion-lambda policies role
+npx remotion lambda policies role
```
### validate
@@ -68,7 +74,7 @@ npx remotion-lambda policies role
Validate the current policies setup is correct by running tests using the AWS policy simulator.
```
-npx remotion-lambda policies validate
+npx remotion lambda policies validate
```
## render
@@ -79,7 +85,7 @@ Renders a video using Remotion Lambda. You need to pass two arguments:
- The ID of the composition that you want to render.
```
-npx remotion-lambda render https://remotionlambda-abcdefgh.s3.eu-central-1.amazonaws.com/sites/abcdefgh HelloWorld
+npx remotion lambda render https://remotionlambda-abcdefgh.s3.eu-central-1.amazonaws.com/sites/abcdefgh HelloWorld
```
## functions
@@ -89,7 +95,7 @@ npx remotion-lambda render https://remotionlambda-abcdefgh.s3.eu-central-1.amazo
Deploys a Remotion render lambda function to your account. You only need 1 function to render videos.
```
-npx remotion-lambda functions deploy
+npx remotion lambda functions deploy
```
### ls
@@ -97,7 +103,7 @@ npx remotion-lambda functions deploy
List the functions deployed to your AWS account.
```console
-npx remotion-lambda functions ls
+npx remotion lambda functions ls
```
### rm
@@ -105,7 +111,7 @@ npx remotion-lambda functions ls
Removes a render function from your AWS account.
```console
-npx remotion-lambda functions rm remotion-lambda-4y2y1aaf
+npx remotion lambda functions rm remotion lambda-4y2y1aaf
```
## cleanup
@@ -113,5 +119,5 @@ npx remotion-lambda functions rm remotion-lambda-4y2y1aaf
This command helps remove Remotion-related resources from your AWS account.
```
-npx remotion-lambda cleanup
+npx remotion lambda cleanup
```
diff --git a/packages/docs/docs/lambda-permissions.md b/packages/docs/docs/lambda-permissions.md
index 8fb788715f..d32ef0e97d 100644
--- a/packages/docs/docs/lambda-permissions.md
+++ b/packages/docs/docs/lambda-permissions.md
@@ -7,7 +7,7 @@ slug: /lambda/permissions
## Required permissions
:::info
-Currently outdated. Does not list all permissions. See `npx remotion-lambda policies user` and `npx remotion-lambda policies role` for the most up to date policy files.
+Currently outdated. Does not list all permissions. See `npx remotion lambda policies user` and `npx remotion lambda policies role` for the most up to date policy files.
:::
<table>
diff --git a/packages/docs/docs/lambda-setup.md b/packages/docs/docs/lambda-setup.md
index a6c117bbad..bc6e285822 100644
--- a/packages/docs/docs/lambda-setup.md
+++ b/packages/docs/docs/lambda-setup.md
@@ -19,7 +19,7 @@ Also update **all the other Remotion packages** to have the same version. Make s
- Go to AWS account IAM section
- Create a new policy
- Click on JSON
-- Type in `npx remotion-lambda policies role` and copy it into the JSON field
+- Type in `npx remotion lambda policies role` and copy it into the JSON field
- Go to tags, no tags are needed
- Give the policy the name `remotion-lambda-policy`!
@@ -57,22 +57,22 @@ AWS_SECRET_ACCESS_KEY=xxx
- Click on your user
- Click "Add inline policy"
- Click JSON
-- Enter in your terminal: `npx remotion-lambda policies user` and copy it in
+- Enter in your terminal: `npx remotion lambda policies user` and copy it in
- Give the policy a name, can be anything
- Click "Create policy"
## 6. Optional: Validate the permission setup
-- Run `npx remotion-lambda policies validate`
+- Run `npx remotion lambda policies validate`
## 7. Deploy a lambda
-- Run `npx remotion-lambda functions deploy`
+- Run `npx remotion lambda functions deploy`
## 8. Deploy a website
-- Run `npx remotion-lambda sites create src/index.tsx`
+- Run `npx remotion lambda sites create src/index.tsx`
## 9. Render a video
-- Run `npx remotion-lambda render <serve-url> <composition-name>`
+- Run `npx remotion lambda render <serve-url> <composition-name>`
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index cb85898ff6..6d597e3f00 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -32,6 +32,7 @@ module.exports = {
"simulatepermissions",
],
},
+ "lambda-changelog",
],
someSidebar: [
{
diff --git a/packages/lambda/src/cli/index.ts b/packages/lambda/src/cli/index.ts
index 6560d3722c..5de39aa5fa 100644
--- a/packages/lambda/src/cli/index.ts
+++ b/packages/lambda/src/cli/index.ts
@@ -39,14 +39,14 @@ const matchCommand = async (args: string[]) => {
if (args[0] === 'upload') {
Log.info('The command has been renamed.');
Log.info('Before: remotion-lambda upload <entry-point>');
- Log.info('After: remotion-lambda sites create <entry-point>');
+ Log.info('After: remotion lambda sites create <entry-point>');
process.exit(1);
}
if (args[0] === 'deploy') {
Log.info('The command has been renamed.');
Log.info('Before: remotion-lambda deploy');
- Log.info('After: remotion-lambda functions deploy');
+ Log.info('After: remotion lambda functions deploy');
process.exit(1);
}
diff --git a/packages/lambda/src/shared/constants.ts b/packages/lambda/src/shared/constants.ts
index 17f00e37f9..b6ad36e719 100644
--- a/packages/lambda/src/shared/constants.ts
+++ b/packages/lambda/src/shared/constants.ts
@@ -10,7 +10,7 @@ export const DEFAULT_TIMEOUT = 120;
export const MIN_TIMEOUT = 15;
export const MAX_TIMEOUT = 900;
-export const BINARY_NAME = 'remotion-lambda';
+export const BINARY_NAME = 'remotion lambda';
export const COMMAND_NOT_FOUND = 'Command not found';
export const DEFAULT_REGION: AwsRegion = 'us-east-1';