1

I made a bucket public and applied a standard policy as

    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": "*",
            "Action": "s3:GetObject",
            "Resource": "arn:aws:s3:::DOC-EXAMPLE-BUCKET/*",
            "Condition": {
                "StringEquals": {
                    "s3:ExistingObjectTag/public": "yes"
                }
            }
        }
    ]
}

(from AWS documentation). I enabled versioning and tagged my object as public=yes. Now the issue arise when I have multiple versions of the same object, only the last one is actually readable (but all have the public=yes tag). I'm confused about this, am I doing something wrong or is this the expected behavior? I have not found anything saying older version would not be accessible.

-thank you for the help and please do dumb it down, I have just started!-

rosysnake
  • 154
  • 2
  • 10
  • How are your objects being accessed? Is it via API calls to AWS (eg `GetObject`), or is it via a public URL such as `my-bucket.s3.amazonaws.com/image.jpg`? How are you specifying which specific version of the object you want to access? – John Rotenstein Dec 01 '21 at 21:04
  • @JohnRotenstein I'm accessing via public URL and just clicking on the URL shown by the AWS web page, except the old version return an access denied XML instead of the JPEG I've uploaded – rosysnake Dec 02 '21 at 11:43
  • If you are using a URL, how are you attempting to access a previous version? Are you appending `?versionId=xxx` to the URL? Or if you are using a link in the S3 management console, please tell us exactly what you clicked and what happened. – John Rotenstein Dec 03 '21 at 10:41

0 Answers0