# 无法设置 S3 存储桶

**URL:** https://meta.discourse.org/t/unable-to-setup-s3-bucket/346372
**Category:** Self-hosting
**Tags:** uploads, s3
**Created:** [2025年一月9日 16:38 UTC](https://meta.discourse.org/t/unable-to-setup-s3-bucket/346372 "2025-01-09T16:38:01Z")
**Posts on this page:** 1
**Showing post:** 11

<div class="post-metadata">

### Author: ![luigi7up](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/luigi7up/32/477213_2.png) [@luigi7up](https://meta.discourse.org/u/luigi7up)
#### Post date: [2025年一月10日 20:44 UTC](https://meta.discourse.org/t/unable-to-setup-s3-bucket/346372/11 "2025-01-10T20:44:33Z")

</div>

您好 @Jagster

实际上，我根本不想使用 CDN——我只想将所有用户上传都存储在 S3 中，并直接从那里提供服务，尽管 CloudFront 确实比直接使用 S3 是一个更好的解决方案。

我的问题出现在我尝试设置 S3（特别是用于提供资源，而不是上传）时，@pfaffman 建议我遵循 [为上传配置 S3 兼容对象存储提供商](https://meta.discourse.org/t/configure-an-s3-compatible-object-storage-provider-for-uploads/148916) 指南并配置 CDN。

关于您的评论：

“您不能只在 app.yml 中命名一个子域。没有人可以在没有正确 DNS 信息的情况下使用它。并且因为您的文件是从 AWS 提供的，所以如果您想使用 CDN，您也必须配置那一边。”

抱歉，我不太明白您在这段话中的意思。您能详细说明或澄清一下吗？您是说我需要为我的 S3 存储桶配置 DNS 记录，还是说我需要在 AWS 端进行一些特定的调整？

提前感谢您的帮助！

---

_[View the full topic](https://meta.discourse.org/t/unable-to-setup-s3-bucket/346372)._
