[object Object] Icon

Encoding
Learn how to create, start, manage and modify Encodings

[object Object] Icon

Player
Learn how to create, start, manage and modify Players

[object Object] Icon

Analytics
Learn how to create, start, manage and modify Analyticss

Docs Home
User shortcuts for search
Focus by pressing f
Hide results by pressing Esc
Navigate via   keys

Mon Dec 10 2018

How do I create a AWS S3 Bucket which can be used as output location?

You can create a new bucket to serve as output location for encoding script, by using the AWS Management Console. The following step by step instructions only provide a basic setup, useful to get started quickly. Please refer to the AWS documentation for more detailed information.

Create a bucket

In the AWS Management Console, open the S3 section.

  • Click on the Create Bucket button which starts the bucket creation wizard
  • Choose a bucket name (for example my-bitmovin-bucket) and a Region (for example (EU) Ireland))
  • Press Next twice, until you get to the "Configure options" page
  • If you are using the bucket for testing playback directly (ie. without a CDN), disable Block new public ACLs and uploading public objects and Remove public access granted through public ACLs
    • If you leave those enabled, you will need to ensure that your scripts set private ACLs on objects output to this bucket
  • Finish going through the wizard and click Create Bucket

Update CORS configuration

After you have successfully created the new bucket, go to its settings pane to provide additional configuration:

  • Click on the Permissions Item.
  • Click on the CORS Configuration Button to open the CORS Configurator.
  • Set the CORS configuration and press Save. The following configuration provides a default policy, but you may want to alter it for your particular needs.
1<?xml version="1.0" encoding="UTF-8"?>
2<CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
3 <CORSRule>
4 <AllowedOrigin>*</AllowedOrigin>
5 <AllowedMethod>GET</AllowedMethod>
6 <AllowedMethod>HEAD</AllowedMethod>
7 <MaxAgeSeconds>3000</MaxAgeSeconds>
8 <AllowedHeader>Authorization</AllowedHeader>
9 </CORSRule>
10</CORSConfiguration>

Create a user

Now open the AWS Identity & Access Management (IAM), which is listed under Security, Identity and Compliance in the Services list.

  • Select the Users entry in the left menu
  • Click on Add User button on the new Page to start the Add User wizard.
  • In the first page, add your desired username then select Programmatic access.
  • Go through the other pages of the wizard - you can ignore other options - and click Create User.

After the user was successfully created, a page will display the two keys you need to store securely (Access Key ID and Secret Access Key). They be used to create S3 Output objects in the Bitmovin API. click on “Show User Security Credentials” and remember the two Keys anywhere – you will need them later on to create the bitmovin Output.

Assign an IAM policy

After closing this page, you are now in the Users Menu again.

  • Click on the newly created User to open its settings page.
  • In the permissions section, click on Add Inline Policy, and select the JSON tab
  • Add the lines below, making sure to replace the YOUR_BUCKET_NAME placeholder with the name of the bucket you set earlier.
  • Click Review Policy
  • Enter a new name for this policy (for example bitmovin-access-policy)
  • Finally, click Create Policy
1{
2 "Version": "2012-10-17",
3 "Statement": [
4 {
5 "Effect": "Allow",
6 "Action": [
7 "s3:GetObject",
8 "s3:PutObject",
9 "s3:PutObjectAcl"
10 ],
11 "Resource": [
12 "arn:aws:s3:::YOUR_BUCKET_NAME/*"
13 ]
14 },
15 {
16 "Effect": "Allow",
17 "Action": [
18 "s3:ListBucket",
19 "s3:GetBucketLocation"
20 ],
21 "Resource": [
22 "arn:aws:s3:::YOUR_BUCKET_NAME"
23 ]
24 }
25 ]
26}

You are now ready to use this S3 bucket in your encoding scripts.

Give us feedback