Skip to content

🎥 Make videos programmatically with React

fix docs

Jonny Burger15e067292b6a
diff --git a/packages/docs/docs/deployfunction.md b/packages/docs/docs/deployfunction.md
index 793f331f51..57842cdd44 100644
--- a/packages/docs/docs/deployfunction.md
+++ b/packages/docs/docs/deployfunction.md
@@ -6,6 +6,8 @@ slug: /lambda/deployfunction
Creates an [AWS Lambda](https://aws.amazon.com/lambda/) function in your AWS account that will be able to render a video in the cloud.
+If a function with the same version, memory size and timeout already existed, it will be returned instead without a new one being created. This means this function can be treated as idempotent.
+
## Example
```ts twoslash
@@ -49,6 +51,7 @@ Whether logs should be saved into CloudWatch. We recommend enabling this option.
An object with the following values:
- `functionName` (_string_): The name of the function just created.
+- `alreadyExisted`: (_boolean_): Whether the creation was skipped because the function already existed.
## See also
diff --git a/packages/docs/docs/lambda-changelog.md b/packages/docs/docs/lambda-changelog.md
index f58ddf4767..2ea89a758f 100644
--- a/packages/docs/docs/lambda-changelog.md
+++ b/packages/docs/docs/lambda-changelog.md
@@ -10,6 +10,22 @@ Keep track of changes to the APIs of Remotion Lambda here.
[Upgrading](/docs/lambda/upgrading)
+## December 16th, 2021
+
+Version hash: `xxxx`
+Lambda version: '2021-12-16'
+
+Stability and ease of use improvements that we implemented from our learnings from https://githubwrapped.com!
+
+- Fixed an error `Parameter 'durationInMiliseconds' must be over 0 but is [negative number]`
+- The function name of a deployed function is not random anymore. Instead it has the format of `remotion-render-2021-12-16-2048mb-120sec`
+- More CLI commands support the `-q` (quiet) flag.
+- Calling `npx remotion lambda functions deploy` if a suitable function already exists will not throw an error anymore but log the existing function.
+- Calling `deployFunction()` if a suitable function already exists will not throw an error anymore but return the existing function.
+- You can now deploy another function with the same region and version, but with a different memory size or timeout. This allows you to increase memory size or timeout without causing downtime. [Read more about it here.](/docs/lambda/faq#do-i-need-to-deploy-a-function-for-each-render)
+- Improved compatibility with Vercel: Since `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` are reserved environment variables on Vercel and are already occupied, you can now set `REMOTION_AWS_ACCESS_KEY_ID` and `REMOTION_AWS_SECRET_ACCESS_KEY` instead for calling any Remotion Lambda Node.JS API.
+- Multi-account load balancing: The environment variables `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `REMOTION_AWS_ACCESS_KEY_ID` and `REMOTION_AWS_SECRET_ACCESS_KEY` can now be switched before making a call to Lambda. (Previously there was a bug that would cache the clients.)
+
## December 10th, 2021 (2)
Version hash: `3.0.0-lambda.206+161f56853`
diff --git a/packages/docs/docs/lambda-faq.md b/packages/docs/docs/lambda-faq.md
index 63a41fadb5..51c4d06fdc 100644
--- a/packages/docs/docs/lambda-faq.md
+++ b/packages/docs/docs/lambda-faq.md
@@ -8,12 +8,13 @@ Some commonly asked questions about Remotion Lambda.
### Do I need to deploy a function for each render?
-No, in general you only need to deploy one function and it will be capable of rendering multiple videos, even across different projects. Trying to deploy multiple functions with the same version and region will result in an error.
+No, in general you only need to deploy one function and it will be capable of rendering multiple videos, even across different projects. Trying to deploy multiple functions with the same version and region will result in the existing function being returned instead.
-There are two exceptions when it is possible to deploy multiple functions:
+There are three exceptions when it is possible to deploy multiple functions:
- If you are using multiple regions, you need to deploy a function for each region.
- If you are upgrading to a newer version of Remotion Lambda, you need to deploy a new function. You can then run the new and the old function side-by-side. The `@remotion/lambda` CLI will always choose the function in your AWS account that has the same version as the client package. If you use the [`getFunctions()`](/docs/lambda/getfunctions) Node.JS API, set the [`compatibleOnly`](/docs/lambda/getfunctions#compatibleonly) flag to `true` to filter out functions that don't match the version of the `@remotion/lambda` package.
+- If you are deploying a function with a different memory size or timeout, a new function can be created. However, currently if multiple suitable functions are available, Remotion will choose one at random. So you should only use this strategy to change the parameters of the function without causing downtime.
### Do I need to create multiple buckets?
diff --git a/packages/docs/docs/lambda-setup.md b/packages/docs/docs/lambda-setup.md
index 3c91107c9a..9931ba6ee8 100644
--- a/packages/docs/docs/lambda-setup.md
+++ b/packages/docs/docs/lambda-setup.md
@@ -67,8 +67,8 @@ You can install `@remotion/lambda` in any project, not just a Remotion one, but
- Add a `.env` file to your project, and insert the following contents, using the credentials you just copied:
```txt title=".env"
-AWS_ACCESS_KEY_ID=<Access key ID>
-AWS_SECRET_ACCESS_KEY=<Secret access key>
+REMOTION_AWS_ACCESS_KEY_ID=<Access key ID>
+REMOTION_AWS_SECRET_ACCESS_KEY=<Secret access key>
```
## 5. Add permissions to your user
diff --git a/packages/lambda/remotionlambda.zip b/packages/lambda/remotionlambda.zip
index 12c1d51db3..60253492fb 100644
Binary files a/packages/lambda/remotionlambda.zip and b/packages/lambda/remotionlambda.zip differ