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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/tensorflow/5.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 AWS-无法访问S3存储桶_Amazon Web Services_Amazon S3_Web Hosting_Access Control_Bucket - Fatal编程技术网

Amazon web services AWS-无法访问S3存储桶

Amazon web services AWS-无法访问S3存储桶,amazon-web-services,amazon-s3,web-hosting,access-control,bucket,Amazon Web Services,Amazon S3,Web Hosting,Access Control,Bucket,尝试使用url访问存储桶时出错。 单击以获取错误详细信息。 桶策略如下所示: { "Version": "2008-10-17", "Id": "PolicyForPublicWebsiteContent", "Statement": [ { "Sid": "PublicReadGetObject", "Effect": "Allow", "Principal": {

尝试使用url访问存储桶时出错。 单击以获取错误详细信息。 桶策略如下所示:

{
    "Version": "2008-10-17",
    "Id": "PolicyForPublicWebsiteContent",
    "Statement": [
        {
            "Sid": "PublicReadGetObject",
            "Effect": "Allow",
            "Principal": {
                "AWS": "*"
            },
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::awsweatherbucket/*"
        }
    ]
}

请帮我解决这个问题。提前感谢。

当bucket未配置为静态网站托管时,它将bucket内容列为XML响应,这是正确的行为

要加载实际网站,您可以直接在以下位置调用index.html:

要正确配置铲斗,请参阅AWS

或者,如果您使用的是AWS CLI,也可以使用以下命令配置bucket:


注意,您的bucket中没有错误文档,但您应该这样做。当用户试图访问一个不存在的页面时,用户将被重定向到该页面。

看起来您已将其修复。您好,这对我有用。你能分享更多的细节吗?
aws s3 website s3://awsweatherbucket/ --index-document index.html --error-document error.html