{"record":{"id":"b58b2605ccacb4e8","repo":"remotion-dev/remotion","slug":"unrecognizedclientexception-the-aws-credentials-p","errorCode":null,"errorMessage":"UnrecognizedClientException: The AWS credentials provided were probably mixed up. Learn how to fix this issue here: https://remotion.dev/docs/lambda/troubleshooting/unrecognizedclientexception","messagePattern":"UnrecognizedClientException: The AWS credentials provided were probably mixed up\\. Learn how to fix this issue here: https://remotion\\.dev/docs/lambda/troubleshooting/unrecognizedclientexception","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/lambda-client/src/get-compositions-on-lambda.ts","lineNumber":105,"sourceCode":"\t\t\t\tserveUrl,\n\t\t\t\tenvVariables,\n\t\t\t\tinputProps: serializedInputProps,\n\t\t\t\tlogLevel: dumpBrowserLogs ? 'verbose' : (logLevel ?? 'info'),\n\t\t\t\ttimeoutInMilliseconds: timeoutInMilliseconds ?? 30000,\n\t\t\t\tversion: VERSION,\n\t\t\t\tbucketName: bucketName ?? null,\n\t\t\t\toffthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes ?? null,\n\t\t\t\tforcePathStyle: forcePathStyle ?? false,\n\t\t\t\tmediaCacheSizeInBytes: mediaCacheSizeInBytes ?? null,\n\t\t\t},\n\t\t\tregion,\n\t\t\ttimeoutInTest: 120000,\n\t\t\trequestHandler,\n\t\t});\n\t\treturn res.compositions;\n\t} catch (err) {\n\t\tif ((err as Error).stack?.includes('UnrecognizedClientException')) {\n\t\t\tthrow new Error(\n\t\t\t\t'UnrecognizedClientException: The AWS credentials provided were probably mixed up. Learn how to fix this issue here: https://remotion.dev/docs/lambda/troubleshooting/unrecognizedclientexception',\n\t\t\t);\n\t\t}\n\n\t\tthrow err;\n\t}\n};\n","sourceCodeStart":87,"sourceCodeEnd":113,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/lambda-client/src/get-compositions-on-lambda.ts#L87-L113","documentation":"getCompositionsOnLambda wraps its call; if the resulting error stack contains 'UnrecognizedClientException', it is rethrown with a clear message. AWS throws UnrecognizedClientException most often when the access key id and secret access key do not belong to the same IAM user/account (a copy-paste mix-up) or when a key has been deleted/rotated.","triggerScenarios":"Calling getCompositionsOnLambda (or any routine routed through this wrapper) with mismatched AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY pair.","commonSituations":"Key rotated but only one of the two values updated; copy-paste collided two different users' keys; trailing whitespace/newline in an env value; key deleted in IAM but still referenced.","solutions":["Regenerate a matching access-key/secret-key pair from the same IAM user and set both env vars","Check for trailing whitespace or newlines in the env values (echo with quotes)","Confirm both values come from the same IAM user and the key is still Active"],"exampleFix":"# before - mixed keys\nAWS_ACCESS_KEY_ID=AKIAUSER1...\nAWS_SECRET_ACCESS_KEY=<user2-secret>\n\n# after - matching pair\nAWS_ACCESS_KEY_ID=AKIAUSER1...\nAWS_SECRET_ACCESS_KEY=<user1-secret>","handlingStrategy":"validation","validationCode":"function assertMatchingAwsCreds() {\n  const key = process.env.AWS_ACCESS_KEY_ID;\n  const secret = process.env.AWS_SECRET_ACCESS_KEY;\n  if (key && secret && !key.includes(secret) && !secret.includes(key)) return; // best-effort\n  if (!key || !secret) throw new Error('AWS credentials incomplete or possibly mismatched');\n}","typeGuard":null,"tryCatchPattern":"try {\n  await getCompositionsOnLambda({...});\n} catch (err) {\n  if ((err as Error).message.includes('UnrecognizedClientException')) {\n    // regenerate and set a matching key/secret pair\n  }\n  throw err;\n}","preventionTips":["Source both key and secret from the same IAM user in one step","Trim whitespace/newlines from CI-injected secret values","Rotate keys by updating both values atomically"],"tags":["aws","credentials","iam","configuration"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}