The job failed three times before anyone realized the FFmpeg process was trying to write to a bucket it could never touch.
When you run FFmpeg on AWS and pull media directly from S3, read-only IAM roles can make or break performance. A misconfigured policy means FFmpeg won’t even see the file, or worse—it gets stuck on permission errors that look like network timeouts. The fix is exact: tighten permissions for security, but let FFmpeg read without noise.
Why Read-Only Roles Matter
In AWS, every operation is bound by IAM. For FFmpeg workloads that only need source files from a bucket, allowing s3:GetObject is enough. Cutting out PutObject and DeleteObject blocks unwanted writes from your pipeline and hardens your security posture. This is crucial when working with large, sensitive video datasets or regulated environments.
Setting Up S3 Read-Only for FFmpeg
- Create an IAM policy with:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::your-bucket-name/*"
}
]
}
- Attach the policy to the role your FFmpeg process assumes.
- Use AWS CLI or SDK to check role propagation before launching FFmpeg.
Direct S3 Input with FFmpeg
FFmpeg can read S3 URLs if the environment is configured for AWS credentials. Example: