🎥 Make videos programmatically with React
implement getRegions() showcase
Jonny Burger1c97ed444908
diff --git a/packages/docs/docs/lambda.md b/packages/docs/docs/lambda.mdindex a1ac2b9331..b79c76f06c 100644--- a/packages/docs/docs/lambda.md+++ b/packages/docs/docs/lambda.md@@ -81,10 +81,6 @@ You can control Remotion Lambda using the `npx remotion lambda` command.Everything you can do using the CLI, you can also control using Node.JS APIs. Refer to the left sidebar to see the list of available APIs.-## Known issues--- [ ] Rendering using more than 1000 chunks is undefined behavior, things will break-## LicenseThe standard Remotion license applies. https://github.com/remotion-dev/remotion/blob/main/LICENSE.mddiff --git a/packages/docs/docs/lambda/changelog.md b/packages/docs/docs/lambda/changelog.mdindex 7aa5fa6cfb..d9dc2726f2 100644--- a/packages/docs/docs/lambda/changelog.md+++ b/packages/docs/docs/lambda/changelog.md@@ -16,6 +16,8 @@ Keep track of changes to the APIs of Remotion Lambda here.- Vast improvements to documentation, CLI documentation complete- `downloadVideo()` was renamed to `downloadMedia()`. The previous API continues to be available.- `renderVideoOnLambda()` was renamed to `renderMediaOnLambda()`. The previous API continues to be available.+- Limited the maximum amount of functions that you can invoke for one render to 200 functions. That means, if your render is 1000 frames, your `framesPerLambda` parameter must be at least `5`. Rendering with a higher concurrency will reduce the amount of videos you can render in parallel and diminish the benefits of concurrency.+- Added [`getRegions()`](/docs/lambda/getregions) API## December 15th, 2021 (2)diff --git a/packages/docs/docs/lambda/getregions.md b/packages/docs/docs/lambda/getregions.mdnew file mode 100644index 0000000000..611c4b6664--- /dev/null+++ b/packages/docs/docs/lambda/getregions.md@@ -0,0 +1,31 @@+---+id: getregions+title: getRegions()+---++Gets an array of all supported AWS regions of this release of Remotion Lambda.++## Example++```tsx twoslash+// @module: esnext+// @target: es2017+import { getRegions } from "@remotion/lambda";++// ---cut---++const regions = await getRegions();+// ["eu-central-1", "us-east-1"]+```++## API++The function takes no arguments.++## Return value++An array of supported regions by this release of Remotion Lambda.++## See also++- [Region selection](/docs/lambda/region-selection)diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.jsindex 663aed24d3..89dcc75d81 100644--- a/packages/docs/sidebars.js+++ b/packages/docs/sidebars.js@@ -75,6 +75,7 @@ module.exports = {"lambda/getfunctions","lambda/deletesite","lambda/deploysite",+ "lambda/getregions","lambda/getsites","lambda/downloadmedia","lambda/getuserpolicy",diff --git a/packages/lambda/src/api/get-regions.ts b/packages/lambda/src/api/get-regions.tsnew file mode 100644index 0000000000..488d93e873--- /dev/null+++ b/packages/lambda/src/api/get-regions.ts@@ -0,0 +1,11 @@+import {AwsRegion} from '..';+import {AWS_REGIONS} from '../regions';++/**+ * @description Gets an array of all supported AWS regions of this release of Remotion Lambda.+ * @link https://remotion-3.vercel.app/docs/lambda/getregions+ * @returns {AwsRegion[]} A list of AWS regions.+ */+export const getRegions = (): readonly AwsRegion[] => {+ return AWS_REGIONS;+};diff --git a/packages/lambda/src/index.ts b/packages/lambda/src/index.tsindex d398845a2e..a18a4a6e6d 100644--- a/packages/lambda/src/index.ts+++ b/packages/lambda/src/index.ts@@ -14,6 +14,7 @@ import {downloadMedia, downloadVideo} from './api/download-video';import {getFunctionInfo} from './api/get-function-info';import {getFunctions} from './api/get-functions';import {getOrCreateBucket} from './api/get-or-create-bucket';+import {getRegions} from './api/get-regions';import {getRenderProgress} from './api/get-render-progress';import {getSites} from './api/get-sites';import {simulatePermissions} from './api/iam-validation/simulate';@@ -52,6 +53,7 @@ export {estimatePrice,LambdaInternals,renderStillOnLambda,+ getRegions,};export type {AwsRegion,