# 迁移上传到 S3 不适用于私有存储桶

**URL:** https://meta.discourse.org/t/migrating-uploads-to-s3-does-not-work-with-private-bucket/94591
**Category:** Feature
**Created:** [2018年八月13日 10:41 UTC](https://meta.discourse.org/t/migrating-uploads-to-s3-does-not-work-with-private-bucket/94591 "2018-08-13T10:41:15Z")
**Posts on this page:** 1
**Showing post:** 8

<div class="post-metadata">

### Author: ![timkelty](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/timkelty/32/158090_2.png) [@timkelty](https://meta.discourse.org/u/timkelty)
#### Post date: [2019年十月9日 16:23 UTC](https://meta.discourse.org/t/migrating-uploads-to-s3-does-not-work-with-private-bucket/94591/8 "2019-10-09T16:23:18Z")

</div>

我也在寻找解决方案。

一个相当标准（且 AWS 推荐）的配置是：永远不要设置公开的 S3 存储桶或对象；如果需要公开提供对象，应通过 CloudFront 分发来实现。

当前的 S3 实现强制要求公开访问 S3 存储桶（通过此问题，以及 [https://meta.discourse.org/t/s3-cdn-url-ignored-when-uploading-into-posts/54898），而这出于安全和成本考虑是不被推荐的。](https://meta.discourse.org/t/s3-cdn-url-ignored-when-uploading-into-posts/54898%EF%BC%89%EF%BC%8C%E8%80%8C%E8%BF%99%E5%87%BA%E4%BA%8E%E5%AE%89%E5%85%A8%E5%92%8C%E6%88%90%E6%9C%AC%E8%80%83%E8%99%91%E6%98%AF%E4%B8%8D%E8%A2%AB%E6%8E%A8%E8%8D%90%E7%9A%84%E3%80%82)

---

_[View the full topic](https://meta.discourse.org/t/migrating-uploads-to-s3-does-not-work-with-private-bucket/94591)._
