我正在尝试为我的存储桶创建别名,但由于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.
更多推荐
发布评论