title: Access denied on AWS s3 bucket even with bucket and/or user policy
body: <p>I've tried pretty much every possible bucket policy.  Also tried adding a policy to the user, but I get Access Denied every time I try to download an object from s3 bucket using the AWS Console.</p>
  
  <p><strong>Bucket Policy:</strong></p>
  
  <pre><code>{
      "Version": "2012-10-17",
      "Id": "MyPolicy",
      "Statement": [
          {
              "Effect": "Allow",
              "Principal": {
                  "AWS": "arn:aws:iam::12345678901011:user/my-username"
              },
              "Action": "s3:*",
              "Resource": [
                  "arn:aws:s3:::my-bucket",
                  "arn:aws:s3:::my-bucket/*"
              ]
          },
          {
              "Effect": "Allow",
              "Principal": "*",
              "Action": "s3:PutObject",
              "Resource": "arn:aws:s3:::my-bucket/*",
              "Condition": {
                  "IpAddress": {
                      "aws:SourceIp": [
                          "XX.XXX.XXX.XXX/24",
                          "XXX.XXX.XXX.XXX/24"
                      ]
                  }
              }
          }
      ]
  }
  </code></pre>
  
  <p>That doesn't work so I tried adding a <strong>policy to my-username:</strong></p>
  
  <pre><code>{
      "Version": "2012-10-17",
      "Statement": [
          {
              "Sid": "StmtXXXXXXXXXX",
              "Effect": "Allow",
              "Action": [
                  "s3:GetObject",
                  "s3:PutObject"
              ],
              "Resource": [
                  "arn:aws:s3:::my-bucket",
                  "arn:aws:s3:::my-bucket/*"
              ]
          }
      ]
  }
  </code></pre>