I've got a bucket where i've accidently uploaded thousands of files with ACL to :public_read I would like all files to be unavailable except with a generated access URL.
I tried to create a bucket policy with deny all to everyone, and allow all to me.
It doesnt work and all files are forbidden even with a generated access URL :
{
"Version": "2008-10-17",
"Id": "Policy1331136935471",
"Statement": [
{
"Sid": "Stmt1331136294179",
"Effect": "Deny",
"Principal": {
"AWS": "*"
},
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::myBucket/*"
},
{
"Sid": "Stmt1331136364169",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::6527...3775:root"
},
"Action": "s3:*",
"Resource": "arn:aws:s3:::myBucket/*"
}
]
}
UPDATE :
i found reference to the default deny in the doc but the AWS Policy Generator has only 2 values "Allow" and "Deny" does anyone has the syntax for default deny ?
Thanks for your help