---
title: "Amazon CloudFront"
url: "https://dudlewebs.com/guideline/media-cloud-sync/cdn-setup/amazon-cloudfront/"
markdown_url: "https://dudlewebs.com/guideline/media-cloud-sync/cdn-setup/amazon-cloudfront.md"
type: "Docs"
language: "en-US"
date_published: "2026-11-08T11:03:25+00:00"
date_modified: "2026-11-09T16:59:36+00:00"
---

# Amazon CloudFront

This guide puts CloudFront in front of your bucket and connects it to Media Cloud Sync. CloudFront works with any bucket that has a public URL, and works best with Amazon S3.

> AWS changes its console from time to time. If a screen looks different, follow the linked AWS guide for that step.

## Step 1: Create the distribution

1. In the [CloudFront console](https://console.aws.amazon.com/cloudfront/), click **Create distribution**.
2. Set the **origin** to your bucket’s address, such as `my-bucket.s3.us-east-1.amazonaws.com`.
3. Choose how CloudFront reads the bucket:
   - **Public bucket:** add the public-read policy from [the S3 guide](https://dudlewebs.com/guideline/media-cloud-sync/storage-providers/quick-start-amazon-web-services-aws-s3/#step-3-set-up-the-s3-bucket).
   - **Private bucket (recommended on S3):** use **Origin Access Control (OAC)**, and add the bucket policy AWS gives you. See AWS’s [Restrict access to an Amazon S3 origin](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/private-content-restricting-access-to-s3.html).
4. Create the distribution and copy its **domain name**, such as `d1234abcd.cloudfront.net`.

If your media needs CORS (fonts, SVGs, or video), use the managed **CORS-S3Origin** origin request policy on the behavior, so the `Origin` header reaches the bucket. See AWS’s [managed origin request policies](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-origin-request-policies.html), and turn on [Bucket CORS](https://dudlewebs.com/guideline/media-cloud-sync/pro-tools/bucket-cors/) `PRO`.

## Step 2: Add your own domain (optional)

To serve from `media.example.com` instead of the `cloudfront.net` address:

1. Add the domain to the distribution as an alternate domain name.
2. Attach an SSL certificate for it. CloudFront needs the certificate to be in AWS Certificate Manager in the `us-east-1` region.
3. Create a CNAME DNS record pointing the domain to the distribution’s domain name.

## Step 3: Connect it to Media Cloud Sync

1. Go to **Media Cloud Sync → Settings** and click **Change** on the **Delivery** card.
2. Choose **Amazon CloudFront**.
3. Enter your domain under **Use Custom Domain Name (CNAME)**, and click **Save**.
4. Click **Recheck** on the **Delivery** card. It should say **Objects are accessible to Read**.

## Step 4: Clear stale files (optional) `PRO`

Connect [CDN Cache Purge](https://dudlewebs.com/guideline/media-cloud-sync/pro-tools/cdn-cache-purge/) with your **Distribution ID**, so files uploaded again under the same name are cleared. On Amazon S3 storage, it can use your S3 storage keys if they’re allowed to create invalidations. Otherwise enter separate keys.

## Private Media `PRO`

With Amazon S3 storage, private files can be served through CloudFront signed URLs. You need a key group, a behavior for the private path restricted to it, and an OAC on the S3 origin. See [Private Media behind a CDN](https://dudlewebs.com/guideline/media-cloud-sync/pro-features/private-media/#private-media-behind-a-cdn).

## Related

- [Delivery Settings and CDN](https://dudlewebs.com/guideline/media-cloud-sync/settings/delivery-settings-and-cdn/)
- [Troubleshooting](https://dudlewebs.com/guideline/media-cloud-sync/sync-and-maintenance/troubleshooting-and-faq/)

[← Previous Clean Orphaned Records PRO](https://dudlewebs.com/guideline/media-cloud-sync/pro-tools/clean-orphaned-records/) [Next → Bunny.net](https://dudlewebs.com/guideline/media-cloud-sync/cdn-setup/bunny-net/)

Still need help?

[Chat with us Quick questions, answered live](https://dudlewebs.com/contact/) [Contact us Sales, partnerships or anything else](https://dudlewebs.com/contact/) [Create a ticket Technical issues with your site](https://dudlewebs.com/submit-ticket/)
