# S3 ו-Cloudfront - ההגדרה לא עובדת

**URL:** https://meta.discourse.org/t/s3-and-cloudfront-setup-not-working/284332
**Category:** Self-hosting
**Tags:** s3
**Created:** [3 בנובמבר,‏ 2023,‏ 1:48pm UTC](https://meta.discourse.org/t/s3-and-cloudfront-setup-not-working/284332 "2023-11-03T13:48:33Z")
**Posts on this page:** 1
**Showing post:** 17

<div class="post-metadata">

### Author: ![akhil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/akhil/32/340051_2.png) [@akhil](https://meta.discourse.org/u/akhil)
#### Post date: [4 בנובמבר,‏ 2023,‏ 9:34am UTC](https://meta.discourse.org/t/s3-and-cloudfront-setup-not-working/284332/17 "2023-11-04T09:34:02Z")

</div>

Please review my setup and kindly let me know if I missed anything: S3 and CloudFront CDN

Based on [this Guide](https://meta.discourse.org/t/set-up-file-and-image-uploads-to-s3/7229)

**Created two buckets:**

One for CDN (Enabled ACL also)  
One for Backups  
Created policy by adding two buckets, attached with IAM user, and generated the access keys.

**Created two CloudFront distributions:**

1. [cdn.mysite.com](http://cdn.mysite.com) (origin is the cdn bucket) by configuring CNAME.

2. [assets.mysite.com](http://assets.mysite.com) (origin is [mysite.com](http://mysite.com)) (Community is on the main domain, not sub-domain) by configuring CNAME.

Based on [this guide](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916):

Added the AWS S3 code, and configuration to app.yml as follows:

 ![image](https://global.discourse-cdn.com/meta/original/4X/c/9/8/c981a2caab90604ec184553e3e7244d0194b232b.png)

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/0/3/303cb7a1bd580a2a35cc77f6ad6259addfe3c8ae.png)

Thank You.

---

_[View the full topic](https://meta.discourse.org/t/s3-and-cloudfront-setup-not-working/284332)._
