packages/docs/docs/lambda/troubleshooting/permissions.mdx
If you get an error message saying that something is wrong with your AWS permissions, read this page for troubleshooting ideas.
.env fileIf you use the Node.JS APIs, be aware that they don't read the .env file automatically. This means you need to either load the .env file or set the environment variables manually.
There are two policy files, one for an AWS user, one for an AWS role. The policies are different, make sure you have correctly assigned both.
It can take several minutes until the policies you entered into AWS propagate. Sometimes waiting 2-3 minutes can solve the problem.
A newer Remotion Lambda version might have required additional permissions. We will note this in the changelog. Make sure you update the policies in AWS.
If AWS environment variables failed to load, other credentials might have been loaded from other places such as the AWS CLI. Log the environment variables to ensure you loaded the correct ones.
Use the npx remotion lambda policies validate command to validate the user policy. Note that this can still mean the role policy is set wrongly or the environment variables don't get loaded when using the Node.JS APIs.