且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Cloudfront 到 s3 重定向到子域,给出访问被拒绝错误

更新时间:2022-04-12 05:11:40

问题在于重定向存储桶前面的 cloudfront 分布.尽管 cloudfront 中 www 存储桶的源自动完成工作正常,但它不适用于重定向存储桶.相反,您需要手动添加它,它不是 s3 rest api 格式,而是静态站点版本.因此,请输入以下形式的内容 example.com.s3-website-us-east-1.amazonaws.com 这看起来有点像 aws 控制台中的错误,它不应该自动完成无效s3 重定向存储桶前面的存储桶名称.

The issue is with the cloudfront distribution in front of the redirect bucket. Although the autocomplete of the origin for the www bucket in cloudfront works fine, it does not work for the redirect bucket. Instead you need to add this manually and it not to be of the s3 rest api format but of the static site version. So instead enter something of the form example.com.s3-website-us-east-1.amazonaws.com This seems a bit of like a bug in the aws console and it shouldn't autocomplete invalid bucket names infront of s3 redirecting buckets.