S3 Bucket Policy

If your media files are already in S3, you can reference them directly when posting an order request with an S3 URI. For this to be successful, the bucket where the files reside must either be public or must have a policy that allows read access to our account. For the latter case, your bucket policy should look like this:

{
	"Version": "2008-10-17",
	"Id": "RevBucketPolicy",
	"Statement": [
		{
			"Sid": "RevBucketPolicyFiles",
			"Effect": "Allow",
			"Principal": {
				"AWS": "arn:aws:iam::414502572119:root"
			},
			"Action": [
				"s3:GetObject"
			],
			"Resource": "arn:aws:s3:::MY-BUCKET/*"
		},
		{
			"Sid": "RevBucketPolicyBucket",
			"Effect": "Allow",
			"Principal": {
				"AWS": "arn:aws:iam::414502572119:root"
			},
			"Action": [
				"s3:ListBucket",
				"s3:GetBucketLocation"
			],
			"Resource": "arn:aws:s3:::MY-BUCKET"
		}
	]
}

Note that there are two statements in the policy. The first statement affects keys within the bucket, while the second part affects the bucket itself. This grants Rev the ability to get the location of the bucket, list files in the bucket, and download files from the bucket.

There is only one change you will have to make to this bucket policy before it's ready to go. Replace MY-BUCKET with the name of your bucket. Leave the /* at the end of the line, as that will apply the policy to every file within the bucket. The rest of the policy can be left alone and it will work fine. Amazon's documentation contains more information about the elements of a Bucket Policy.

If you'd like to build your own Bucket Policy, you can use Amazon's Policy Generator. Use arn:aws:iam::414502572119:root as the AWS Principal to allow Rev access.

To set this policy for your S3 account, go to the AWS Console. Select your bucket on the left side of the screen, then click "properties". Expand the "Permissions" item, and click "Add/Edit bucket policy". Copy the policy above and paste it in and save.

If your media files are not in S3, you can upload them to our server with a POST to /inputs.