Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/amazon-s3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services 如何修复S3存储桶上被拒绝的访问?_Amazon Web Services_Amazon S3 - Fatal编程技术网

Amazon web services 如何修复S3存储桶上被拒绝的访问?

Amazon web services 如何修复S3存储桶上被拒绝的访问?,amazon-web-services,amazon-s3,Amazon Web Services,Amazon S3,当我尝试访问我的bucket root()时,我的访问被拒绝了,但是,如果我直接访问“index.html”我可以正确地看到页面 桶策略: { "Version": "2012-10-17", "Statement": [ { "Sid": "PublicReadGetObject", "Effect&qu

当我尝试访问我的bucket root()时,我的访问被拒绝了,但是,如果我直接访问“index.html”我可以正确地看到页面

桶策略:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::mybucket-public/*"
        }
    ]
}

解决方法如下:

在Cloudfront分发设置中,我有以下功能:

默认根对象:index.html

现在,当访问abcdef123.cloudfront.net时,它指向bucket的index.html