title: Setting S3 Bucket Policies
body: <p>I'm building a website where users can upload files directly to amazon s3. I temporarily sign a url w/ my secret key that grants the user temporary PUT access to my site. This is possible through the CORS configuration.</p>
  
  <p>Now, once the files are up there I want no one to read them but me. The current bucket policy I have disallows everyone from reading objects <em>including</em> me, the admin. Which is not good. What bucket policy will help me here?</p>
  
  <p>Here is my working CORS.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;CORSConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/"&gt;
      &lt;CORSRule&gt;
          &lt;AllowedOrigin&gt;http://url.com&lt;/AllowedOrigin&gt;
          &lt;AllowedMethod&gt;PUT&lt;/AllowedMethod&gt;
          &lt;AllowedHeader&gt;*&lt;/AllowedHeader&gt;
      &lt;/CORSRule&gt;
  &lt;/CORSConfiguration&gt;
  </code></pre>
  
  <p><strong>UPDATE</strong>: Works with this policy: </p>
  
  <pre><code> {
          "Version": "2008-10-17",
          "Statement": [
              {
                  "Sid": "AllowPublicRead",
                  "Effect": "Deny",
                               "NotPrincipal": {
                                  "AWS":"arn:aws:iam::123456789012:user/Bob"
                               }
                  "Action": "s3:GetObject",
                  "Resource": "arn:aws:s3:::&lt;bucket&gt;/*"
              }
          ]
      }
  </code></pre>