S3 Bucket Policy不接受.io域名(S3 Bucket Policy not accepting .io domain)

编程入门 行业动态 更新时间:2024-10-27 18:25:57
S3 Bucket Policy不接受.io域名(S3 Bucket Policy not accepting .io domain)

我正在尝试为我的存储桶创建别名,但由于S3存储桶策略不接受我的策略,因此无法正确设置。

{ "Version": "2012-10-17", "Statement": [ { "Sid": "qweewfewr", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::mydomain.io/*" } ] }

错误消息

Add a new policy or edit an existing bucket policy in the text area below. Learn more. Policy has invalid resource - arn:aws:s3:::mcommerce.io/*

I was trying to make an alias for my bucket but I can't make the setting correct as S3 bucket policy doesn't accept my policy.

{ "Version": "2012-10-17", "Statement": [ { "Sid": "qweewfewr", "Effect": "Allow", "Principal": "*", "Action": "s3:GetObject", "Resource": "arn:aws:s3:::mydomain.io/*" } ] }

Error msg

Add a new policy or edit an existing bucket policy in the text area below. Learn more. Policy has invalid resource - arn:aws:s3:::mcommerce.io/*

最满意答案

错误消息对我来说非常清楚。 您使用的资源名称不存在。 您需要将mydomain.io替换为您尝试打开访问权限的存储桶的名称。

至于如何为存储桶创建别名,这与存储桶策略完全无关。 该存储桶策略是告诉S3它有权将服务中的项目提供给任何请求它们的人。 制作别名完全是一个不同的过程。

要创建别名,您需要打开Route53控制台并添加一个新的A Record ,它是您尝试使用的域地址。 然后,您可以添加您的存储桶地址https://<region>.amazonaws.com/<bucketname>/和viola,您有一个与存储桶绑定的别名网址。 有关完整教程, 请查看本文。

The error message seems pretty clear to me. The resource name you are using does not exist. You need to replace mydomain.io with the name of your bucket you are trying to open access to.

As far as how to make an alias for the bucket, that has absolutely nothing to do with the bucket policy. That bucket policy is to tell S3 that it has permission to serve the items in it to whoever asks for them. Making an alias is a different process altogether.

To make an alias, you need to open the Route53 console and add a new A Record that is the domain address you are trying to use. Then you can add your bucket address https://<region>.amazonaws.com/<bucketname>/ and viola, you have an alias web address tied to the bucket. For a full tutorial check out this article.

更多推荐

本文发布于:2023-07-14 17:18:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1106059.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不接受   域名   Policy   Bucket   accepting

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!