AWS S3 bucket access denied despite public access

40 views Asked by At

Here's my bucket policy:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::MY-BUCKET-NAME/*"
        }
    ]
}

Here's the CORS rules:

[
    {
        "AllowedHeaders": [
            "*"
        ],
        "AllowedMethods": [
            "PUT",
            "POST",
            "GET"
        ],
        "AllowedOrigins": [
            "*"
        ],
        "ExposeHeaders": []
    }
]

I've enabled public access.

enter image description here

I'm getting access denied. It was working on last Monday. Nothing has changed since then. I even tried the clock answer posted here.

Nothing works.

What am I missing?

1

There are 1 answers

0
Ayudh On

I was accessing a folder. Apparently this isn't possible. I had to specify the specific item in the folder to access it so I changed the key from folder to folder/item.