用于服务静态S3含量的CloudFront-使用S3origin或Customorigin?

发布于 2025-02-11 14:08:18 字数 767 浏览 1 评论 0原文

我正在设置CloudFront发行版,以托管S3上的静态单页WebApp。首先,我将自定义来源用于水桶,但是在部署了云形式模板后,转到Distribution URL只是给出了403个错误。进入AWS控制台并将类型更改为S3后,它起作用。 我想了解这两种起源之间的区别。

在CloudFront的云形式参考中,有 this

使用此类型指定不是Amazon S3存储桶的原点,但一个例外。如果Amazon S3存储桶配置为静态网站托管,请使用此类型。如果未配置Amazon S3存储台静态网站托管,请改用S3originconfig类型。

使用 s3 Origin 建立CF分布之间的实践差异是什么区别/em>启用了静态托管的Bucket ?性能,成本,灵活性是否有差异?

I'm setting up a CloudFront distribution to host a static single-page webapp on S3. At first, I used a custom origin towards my bucket, but after deploying my CloudFormation template, going to the distribution URL just gave a 403 error. After going into the AWS console and changing type to S3, it works.
I want to understand the difference between these two types of origins.

In the CloudFormation reference for CloudFront, there's this:

Use this type to specify an origin that is not an Amazon S3 bucket, with one exception. If the Amazon S3 bucket is configured with static website hosting, use this type. If the Amazon S3 bucket is not configured with static website hosting, use the S3OriginConfig type instead.

What is the difference in practice between setting up a CF distribution using an S3 origin towards a bucket without static hosting enabled, and a CF distribution using a custom origin towards a bucket with static hosting enabled? Is there a difference in performance, cost, flexibility, ...?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文