# Configure an S3 compatible object storage provider for uploads

**URL:** https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916
**Category:** Self-Hosting
**Tags:** cdn, configuring, how-to, reference
**Created:** [April 22, 2020, 10:37pm UTC](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916 "2020-04-22T22:37:37Z")
**Posts on this page:** 1
**Showing post:** 201

<div class="post-metadata">

### Author: ![Richie](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/richie/32/115110_2.png) [@Richie](https://meta.discourse.org/u/Richie)
#### Post date: [February 14, 2021, 9:02pm UTC](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916/201 "2021-02-14T21:02:52Z")

</div>

Hi everyone,

I’ve been using S3 storage for a number of years now _without_ a CDN.

Following the advice given to me in [another thread](https://meta.discourse.org/t/what-should-i-enter-in-the-s3-cdn-settings-if-i-dont-have-a-cdn/174610) I have today setup CloudFront CDN.

Before I add the CDN URL to my control panel and rebake 230,000+ posts only to find out I’ve got a CloudFront setting wrong and break everything, can someone confirm this is the expected behaviour for me please? 🙇🏻‍♂️

Currently, this is an example URL that for an image that a user has uploaded:

`https://greyarrows.s3.dualstack.eu-west-2.amazonaws.com/original/3X/8/3/8335cab232f512f4a979c7f0c8562e149c01b212.png`

Which displays:

 ![](https://global.discourse-cdn.com/meta/original/3X/1/f/1fa000ef6169842ab15613437b3de9ad3a3648fd.png)

My CloudFront “Domain Name” is: `d1q8cepst0v8xp.cloudfront.net`

If I manually edit my example URL above and replace the existing `S3` part of the domain name with the domain name of my CloudFront domain name, I get:

`https://d1q8cepst0v8xp.cloudfront.net/original/3X/8/3/8335cab232f512f4a979c7f0c8562e149c01b212.png`

And sure enough, the image still loads correctly:

 ![](https://global.discourse-cdn.com/meta/original/3X/1/f/1fa000ef6169842ab15613437b3de9ad3a3648fd.png)

Therefore, am I correct in thinking I simply need to add a S3 CDN URL of d1q8cepst0v8xp.cloudfront.net` to my Discourse control panel, rebake all posts and just sit back and wait of the magic to happen?

Thanks in advance, CDN is all new to me and I don’t have a development environment in which to safely test this 😬

---

_[View the full topic](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916)._
