S3 IAM Policy for Uploading Videos
This IAM policy grants an application or user permission to list a specific S3 bucket and upload/retrieve video objects with tagging support.
Policy JSON
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "AllowBucketListing",
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::your-input-bucket"
},
{
"Sid": "AllowObjectManagement",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObject",
"s3:PutObjectTagging",
"s3:GetObjectTagging"
],
"Resource": "arn:aws:s3:::your-input-bucket/*"
}
]
}
Apply
# Attach to an IAM user or role in the AWS Console:
# IAM -> Users -> your-user -> Add permissions -> Attach policies directly
# Or using the CLI:
aws iam put-user-policy \
--user-name your-uploader-user \
--policy-name VideoUploadPolicy \
--policy-document file://upload-policy.json
Notes
- Replace
your-input-bucketwith your actual bucket name. - Use IAM roles (not access keys) for EC2 instances and Lambda functions.
- Restrict to specific prefixes with
arn:aws:s3:::bucket/uploads/*for finer-grained control.