1 min read

AWS S3 Public Bucket Policy

Shealan

This is a handy snippet to have on hand. Use this AWS S3 bucket policy to make all current and future files publically readable.

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

The Resource value should be modified to contain your bucket name. The /* part after applies the policy to all the files inside the bucket. Don't forget that part if you're pasting in the arn, you'll get an error otherwise.