Skip to content

🎥 Make videos programmatically with React

`@remotion/lambda`: Allow skipping AWS credentials check

Jonny Burger8f88c272f6b4
diff --git a/packages/docs/docs/lambda/authentication.md b/packages/docs/docs/lambda/authentication.mdx
similarity index 85%
rename from packages/docs/docs/lambda/authentication.md
rename to packages/docs/docs/lambda/authentication.mdx
index 0bd8f6eb49..d488073a74 100644
--- a/packages/docs/docs/lambda/authentication.md
+++ b/packages/docs/docs/lambda/authentication.mdx
@@ -80,6 +80,18 @@ aws_secret_access_key = YOUR_SECRET_ACCESS_KEY
In this example, we added a `remotion` profile. Now, by setting `REMOTION_AWS_PROFILE=remotion`, you can select the profile and don't need to pass each environment variable separately anymore.
+## Skipping the credentials check<AvailableFrom v="4.0.160"/>
+
+There are other ways the S3 client can authenticate, like from EC2 instance metadata.
+If you have set this up, you may set the `REMOTION_SKIP_AWS_CREDENTIALS_CHECK` environment variable to any value.
+
+```ts
+process.env.REMOTION_SKIP_AWS_CREDENTIALS_CHECK = "1";
+```
+
+Remotion will not check the credentials and will not throw an error if they are not set.
+However, if there is a misconfiguration, you may still get an error from the AWS SDK.
+
## See also
- [Region selection](/docs/lambda/region-selection)
diff --git a/packages/lambda/src/shared/check-credentials.ts b/packages/lambda/src/shared/check-credentials.ts
index 55dd9eeca0..5bbbf3bde1 100644
--- a/packages/lambda/src/shared/check-credentials.ts
+++ b/packages/lambda/src/shared/check-credentials.ts
@@ -17,6 +17,10 @@ const messageForVariable = (variable: string) => {
};
export const checkCredentials = () => {
+ if (process.env.REMOTION_SKIP_AWS_CREDENTIALS_CHECK) {
+ return;
+ }
+
if (process.env.REMOTION_AWS_PROFILE || process.env.AWS_PROFILE) {
return;
}