jeudi 17 septembre 2020

Static s3 site gives 403 error when on mobile or chrome incognito mode

Whenever I access my site normally (not incognito) I am able to go to https://example.com and https://example.com/login

However, whenever I go into Chrome incognito mode or on my mobile chrome browser (not incognito), I get

This XML file does not appear to have any style information associated with it. The document tree is shown below.

<Error>
<Code>AccessDenied</Code>
<Message>Access Denied</Message>

and in console it shows

Failed to load resource: the server responded with a status of 403 ()

My s3 access policy is

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

and I have Block public access turned off. I use cloudfront to redirect http to https and that seems to be about it.




Aucun commentaire:

Enregistrer un commentaire