An encoding uses Input and Output resources to define where to get source files from and where to write result files. When you use S3 bucket, you need to provide the IAM user accessing the bucket a set of permissions.

Learn more in these tutorials about creating AWS S3 Inputs/Outputs using [Access/Secret keypairs](🔗) or [role-based authentication](🔗).

# Full Access

If you want a quick solution, for example for quick evaluations or development environments, you can simply allocate the `AmazonS3FullAccess` policy will give the IAM user unrestricted access to your bucket.

# Restricted Access

For most applications, you will want to tighten permissions to the strict set required. With AWS IAM, you have granular control to create a custom policy that only defines certain permissions.

The minimum set required (and why each permission is needed) is listed below:

## For Input buckets

ActionResource LevelJustification
`s3:GetBucketLocation`BucketTo determine the location of the input bucket to resolve the correct encoding region for mode AUTO.
`s3:GetObject`ObjectTo read the file from the S3 bucket

## For Output buckets

ActionResource LevelJustification
`s3:GetBucketLocation`BucketTo determine the location of the output bucket to resolve the correct region for mode `AUTO`
`s3:ListBucket`BucketTo verify if all files are present at the output location (i.e., check if all uploaded segments are present)
`s3:PutObject`ObjectTo write the file to the S3 Bucket
`s3:PutObjectAcl`<sup>(1)</sup>ObjectTo update the ACL for an object on a S3 Bucket (i.e., to allow public access to a file)
`s3:GetObject`ObjectTo check that the file was successfully uploaded

(1) Access control list (ACL) enable you to manage access to buckets and objects. In our API it is possible to set the output of muxings and manifests to `PUBLIC_READ` or `PRIVATE`.

### Public access for Output buckets

For Encodings started in our [Bitmovin Dashboard](🔗), the output bucket’s policy needs to allow **public access** to your Amazon S3 storage. The `PUBLIC_READ` setting requires also that the correct bucket ownership policies are set. Here is a FAQ on how to do this: [How can I configure an AWS S3 Bucket to test playback of my content?](🔗)

## JSON Custom Policy

Assuming that you are using the same IAM user and a single policy for both Input and Output buckets, you can use the following JSON payload to create your custom policy in AWS IAM.

The following placeholders need to be replaced with the name of your bucket(s):