Connect Amazon S3 storage

Updated Oct 29, 2026 · 5 min read · All plans

This article shows you how to connect an Amazon S3 bucket to PlayerMagick, and how to keep viewing costs down with Amazon CloudFront.

This is optional. PlayerMagick stores your videos for you, with nothing to set up. Connecting your own bucket is only for accounts where it is turned on: accounts that already used their own storage, and accounts where support turned it on at your request. See How PlayerMagick stores your videos.

Before you start: viewing fees

Amazon charges for every gigabyte your visitors watch (data transfer out of S3 to the internet). The more views your page gets, the higher the bill.

To estimate: a 20-minute video watched to the end at 720p uses up to about 440 MB, so 1,000 full views are up to about 440 GB of downloads. Check Amazon's current S3 and CloudFront prices to see what that costs you.

Two ways to reduce this:

  • Put Amazon CloudFront in front of the bucket (this article, option A). CloudFront is Amazon's delivery network. It is usually cheaper per gigabyte than S3 directly, includes a free monthly allowance, and delivers videos faster around the world.
  • Use Cloudflare R2 instead. It has no viewing fees. See Connect Cloudflare R2 storage.

Amazon's console changes often. If a label below does not match exactly, look for the closest one.

Step 1: Create a bucket

  1. In the AWS console, open S3 and click Create bucket.
  2. Enter a name, for example acme-sales-videos, and choose an AWS Region close to most of your visitors, for example eu-central-1. Write the region down.
  3. Leave Block all public access turned on if you follow option A (CloudFront). Turn it off only for option B.
  4. Click Create bucket.

Use a name without dots (acme-sales-videos, not videos.acme.com).

Step 2: Give your videos a public address

Option A: CloudFront (recommended)

  1. Open CloudFront and click Create distribution.
  2. Under Origin domain, choose your S3 bucket.
  3. Under Origin access, choose Origin access control settings (recommended) and create a control setting with the defaults. Your bucket stays private; only CloudFront can read it.
  4. Under Cache policy, choose CachingOptimized.
  5. Under Origin request policy, choose CORS-S3Origin. This passes the information the player needs to load videos from your sales page (CORS) through to S3. Without it, the CORS check fails.
  6. Click Create distribution.
  7. CloudFront shows a banner with a bucket policy to copy. Click Copy policy, open your bucket's Permissions tab, edit Bucket policy, paste it and save.
  8. Wait until the distribution is deployed, then copy its Distribution domain name, for example d1a2b3c4d5e6f7.cloudfront.net.

Your Public URL for playback is https://d1a2b3c4d5e6f7.cloudfront.net (or your own domain if you add one to the distribution).

Option B: a public bucket (simpler, more expensive to watch)

  1. Open your bucket's Permissions tab.
  2. Under Block public access (bucket settings), click Edit, turn off Block all public access and confirm.
  3. Under Bucket policy, click Edit and paste, replacing YOUR-BUCKET:
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "PublicReadForPlayerMagick",
      "Effect": "Allow",
      "Principal": "*",
      "Action": "s3:GetObject",
      "Resource": "arn:aws:s3:::YOUR-BUCKET/*"
    }
  ]
}

Your Public URL for playback is https://YOUR-BUCKET.s3.YOUR-REGION.amazonaws.com.

With option B, Settings → Storage shows CDN: None for this bucket, as a reminder that videos are not delivered through a network.

Step 3: Create a key for PlayerMagick

Create a separate user that can only use this bucket.

  1. Open IAM → Policies → Create policy, switch to JSON and paste, replacing YOUR-BUCKET twice:
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": ["s3:ListBucket", "s3:ListBucketMultipartUploads", "s3:GetBucketCORS", "s3:PutBucketCORS"],
      "Resource": "arn:aws:s3:::YOUR-BUCKET"
    },
    {
      "Effect": "Allow",
      "Action": ["s3:PutObject", "s3:GetObject", "s3:DeleteObject", "s3:AbortMultipartUpload", "s3:ListMultipartUploadParts"],
      "Resource": "arn:aws:s3:::YOUR-BUCKET/*"
    }
  ]
}
  1. Name the policy PlayerMagickBucketAccess and click Create policy.
  2. Open IAM → Users → Create user, name it playermagick, and do not give it console access.
  3. Choose Attach policies directly, select PlayerMagickBucketAccess, and create the user.
  4. Open the user, go to Security credentials and click Create access key.
  5. Choose Application running outside AWS and finish.
  6. Copy the Access key and the Secret access key. Amazon shows the secret only once.

Never use your AWS root account's keys.

Step 4: Connect the bucket in PlayerMagick

  1. Open the Storage step of the first setup, or go to Settings → Storage and click Connect a bucket.
  2. Choose Amazon S3. It is marked VIEWING FEES as a reminder of the costs above.
  3. Fill in:
    • Region : from step 1, for example eu-central-1.
    • Bucket name: from step 1.
    • Access key ID and Secret access key: from step 3.
    • Public URL for playback: from step 2.
  4. Click Test connection and wait for the four checks: "Wrote a test file", "Read it back through the public URL", "Deleted it", "Set up browser uploads (CORS) for you".
  5. Click Save and continue.

Troubleshooting

  • "Read it back through the public URL" fails with CloudFront: wait until the distribution has finished deploying, check that the bucket policy from step 2 is saved, then click Test again.
  • The CORS check fails with CloudFront: check that the distribution's Origin request policy is CORS-S3Origin. After changing it, wait for the deployment to finish.
  • The first check fails: check the region (a bucket in another region fails), both keys, and that the policy is attached to the user.

All messages: Fix a storage connection test error.

Was this article helpful?