-1

So we have 300GB+ of files, in folders like the example above:

1000

file.jpg

big/file.jpg

medium/file.jpg

2000

file.jpg

big/file.jpg

medium/file.jpg

How to I set permission to allow anyone to read all objects inside "big" and "medium" in entirely bucket?

1 Answers1

0

You should use policy as mentioned here.

{
  "Version":"2012-10-17",
  "Statement":[
    {
      "Sid":"AddPerm",
      "Effect":"Allow",
      "Principal": "*",
      "Action":["s3:GetObject"],
      "Resource":["arn:aws:s3:::examplebucket/1000/big/*"]
    }
  ]
}
sudo
  • 181
  • 4
  • Thanks, the problem is that I used S3 cli to copy from one bucket to another, but he lost files permissions! Now I need to set permissions but theres no way to know the resources, maybe I'll have to run a php script or something but it will charge millions of puts. – Marcelo Agimóvel Aug 24 '18 at 11:37