Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I need to have all my bucket files to be public for view. I have added view permissions to everyone at bucket properties in AWS console. But looks like after that I have to explicitly press "Make public" for the file. Why if I already have rights for it?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Adding this policy to your bucket under the bucket's main preferences will allow global read access to all files in your bucket. Replace YOURBUCKETNAME with the name of your bucket. This will only allow downloading, not listing files or anything else.

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

For a starting point for more information see the following links.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.