🎥 Make videos programmatically with React
allow REMOTION_AWS_REGION to be set
Jonny Burgerc9f86fd9b262
diff --git a/packages/docs/docs/lambda/cli.md b/packages/docs/docs/lambda/cli.mdindex e769f77333..5f73492ea0 100644--- a/packages/docs/docs/lambda/cli.md+++ b/packages/docs/docs/lambda/cli.md@@ -26,7 +26,7 @@ Selects an AWS region: For example:--region=eu-central-1```-The default region is `us-east-1`. You may also set a `AWS_REGION` environment variable directly or via `.env` file.+The default region is `us-east-1`. You may also set a `REMOTION_AWS_REGION` environment variable directly or via `.env` file.See: [Region selection](/docs/lambda/region-selection)diff --git a/packages/docs/docs/lambda/region-selection.md b/packages/docs/docs/lambda/region-selection.mdindex f48e8a8f5c..e7e9220ade 100644--- a/packages/docs/docs/lambda/region-selection.md+++ b/packages/docs/docs/lambda/region-selection.md@@ -28,12 +28,12 @@ There are 3 ways of selection a region:- When using the Node.JS APIs, you have to pass the region explicitly to each function. Make sure your projects satisfy the Typescript types or follow the documentation.-- When using the CLI, you can set the region using the `AWS_REGION` environment variable. It's best to put it in a `.env` file so you don't forget it sometimes.+- When using the CLI, you can set the region using the `REMOTION_AWS_REGION` environment variable. It's best to put it in a `.env` file so you don't forget it sometimes.- You can also pass the `--region` flag to all CLI commands to override the region. The flag takes precedence over the environment variable.:::info-The AWS_REGION environment variable and `--region` flag do not work when using the Node.JS APIs. You need to pass a region explicitly.+The REMOTION_AWS_REGION environment variable and `--region` flag do not have an effect when using the Node.JS APIs. You need to pass a region explicitly.:::If you don't set a region, Remotion will use the default region.diff --git a/packages/lambda/src/cli/get-aws-region.ts b/packages/lambda/src/cli/get-aws-region.tsindex 1bb2377e37..d0dbde63be 100644--- a/packages/lambda/src/cli/get-aws-region.ts+++ b/packages/lambda/src/cli/get-aws-region.ts@@ -14,7 +14,7 @@ export const getAwsRegion = (): AwsRegion => {return parsedLambdaCli.region;}- const envVariable = process.env.AWS_REGION;+ const envVariable = process.env.REMOTION_AWS_REGION ?? process.env.AWS_REGION;if (envVariable) {validateAwsRegion(envVariable);return envVariable;diff --git a/packages/lambda/src/test/unit/price-calculation.test.ts b/packages/lambda/src/test/unit/price-calculation.test.tsindex 04354536f3..12abdbe7f2 100644--- a/packages/lambda/src/test/unit/price-calculation.test.ts+++ b/packages/lambda/src/test/unit/price-calculation.test.ts@@ -3,7 +3,7 @@ import {estimatePriceFromBucket} from '../../functions/helpers/calculate-price-ftest('Should not throw while calculating prices when time shifts occur', () => {const aDate = Date.now();process.env.REMOTION_LAMBDA = 'true';- process.env.AWS_REGION = 'us-east-1';+ process.env.REMOTION_AWS_REGION = 'us-east-1';const price = estimatePriceFromBucket({contents: [