title: How to set amazon S3 bucket policy to private to everyone except admin?
body: <p>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.</p>
  
  <p>I tried to create a bucket policy with deny all to everyone, and allow all to me.</p>
  
  <p>It doesnt work and all files are forbidden even with a generated access URL :</p>
  
  <blockquote>
    <p><a href="http://s3.amazonaws.com/myBucket/myFile.pdf?AWSAccessKeyId=AKIAIZB2XTOJ6KYB5SCA&amp;Expires=1331137308&amp;Signature=zRfPOj4XFBrXhyqDZ5DpwJqsWs0%3D" rel="noreferrer">http://s3.amazonaws.com/myBucket/myFile.pdf?AWSAccessKeyId=AKIAIZB2XTOJ6KYB5SCA&amp;Expires=1331137308&amp;Signature=zRfPOj4XFBrXhyqDZ5DpwJqsWs0%3D</a></p>
  </blockquote>
  
  <pre><code>{
      "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/*"
          }
      ]
  }
  </code></pre>
  
  <p><strong>UPDATE :<br>
  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 ?</strong></p>
  
  <p>Thanks for your help</p>