How do I make all files in an S3 bill public?
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 to share