qoomon / aws-s3-bucket-browser

Single page application to browse AWS S3 bucket content
https://qoomon.github.io/aws-s3-bucket-browser/index.html?bucket=https://s3.amazonaws.com/spacenet-dataset#
MIT License
246 stars 85 forks source link

Bucket URL https://bucket/index.html is not a valid bucket API URL, response does not contain <ListBucketResult><Delimiter> tag. #33

Closed Dhyanesh97 closed 2 years ago

Dhyanesh97 commented 2 years ago

Bucket URL https://bucket/index.html is not a valid bucket API URL, response does not contain tag.

I only modified bucketUrl and rootPrefix in index.html. made bucket as public. added Bucket policy and CORS.

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "PublicRead",
            "Effect": "Allow",
            "Principal": "*",
            "Action": [
                "s3:ListBucket",
                "s3:GetObject"
            ],
            "Resource": [
                "arn:aws:s3:::bucket",
                "arn:aws:s3:::bucket/*"
            ]
        }
    ]
}
[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "GET"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": [
            "x-amz-server-side-encryption",
            "x-amz-request-id",
            "x-amz-id-2"
        ],
        "MaxAgeSeconds": 3000
    }
]

Any help appreciated.

Dhyanesh97 commented 2 years ago

Issue solved when I enabled static website hosting and provided path in the index.html