How do I make all files in an S3 bill public?

My S3 Bucket was closed. But now I have updated it to be public. I still cannot access files without URL signing etc. How can I make them public?

+3


source to share


1 answer


To make all objects in a bucket public, create a Bucket policy on that particular bucket that grants permissions GetObject

to anonymous users. Replace "examplebucket" with the bucket name. You can add the Bucket Policy in the Amazon S3 Management Console under Permissions.



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

      

+3


source







All Articles