remotion-dev/remotion · error · Error
You have tried to call a Remotion Lambda function, but have
Error message
You have tried to call a Remotion Lambda function, but have not set the environment variable AWS_SECRET_ACCESS_KEY or REMOTION_AWS_SECRET_ACCESS_KEY.
What it means
Companion to the access-key check: checkCredentials throws if neither AWS_SECRET_ACCESS_KEY nor REMOTION_AWS_SECRET_ACCESS_KEY is set, and no profile resolves. Same skip rules apply (REMOTION_SKIP_AWS_CREDENTIALS_CHECK, AWS_PROFILE, detected profile file).
Source
Thrown at packages/lambda-client/src/check-credentials.ts:45
if (isLikelyToHaveAwsProfile()) {
return;
}
if (
!getEnvVariable('AWS_ACCESS_KEY_ID') &&
!getEnvVariable('REMOTION_AWS_ACCESS_KEY_ID')
) {
throw new Error(
messageForVariable('AWS_ACCESS_KEY_ID or REMOTION_AWS_ACCESS_KEY_ID'),
);
}
if (
!getEnvVariable('AWS_SECRET_ACCESS_KEY') &&
!getEnvVariable('REMOTION_AWS_SECRET_ACCESS_KEY')
) {
throw new Error(
messageForVariable(
'AWS_SECRET_ACCESS_KEY or REMOTION_AWS_SECRET_ACCESS_KEY',
),
);
}
};
View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Set AWS_SECRET_ACCESS_KEY (or REMOTION_AWS_SECRET_ACCESS_KEY) alongside the access key id
- Verify the secret was not truncated/filtered by CI masking
- Use a profile / IAM role instead of long-lived env secrets where possible
Example fix
# .env AWS_ACCESS_KEY_ID=AKIA... # before: secret missing # after AWS_SECRET_ACCESS_KEY=<your-secret>
Defensive patterns
Strategy: validation
Validate before calling
function assertAwsSecret() {
const secret = process.env.AWS_SECRET_ACCESS_KEY ?? process.env.REMOTION_AWS_SECRET_ACCESS_KEY;
if (!secret && !process.env.AWS_PROFILE && !process.env.REMOTION_AWS_PROFILE) {
throw new Error('Set AWS_SECRET_ACCESS_KEY before calling Remotion Lambda');
}
} Prevention
- Configure both access key id and secret together
- Beware CI masking that strips one value
- Prefer IAM roles / profiles over long-lived env secrets
When it happens
Trigger: Access key id is set but the secret access key env var is missing when an AWS call begins.
Common situations: Partial .env (key copied, secret forgotten), CI secret only partially configured, secret redacted by a CI mask.
Related errors
- You have tried to call a Remotion Lambda function, but have
- UnrecognizedClientException: The AWS credentials provided we
- could not load AWS config: %w
- Lambda Insights is not supported by AWS in region ${region}.
- No valid AWS Caller Identity detected
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/11ac2988ffac8849.
Report an issue: GitHub.