title: Access is denied even if IAM user is specified in S3 bucket policy
body: <p>I am now trying to use AWS S3.<br />
  I created an IAM user with no &quot;Permissions policies&quot;.<br />
  And, the bucket policy of S3 is set as follows.</p>
  <pre><code>{
      &quot;Version&quot;: &quot;2012-10-17&quot;,
      &quot;Statement&quot;: [
          {
              &quot;Sid&quot;: &quot;SpecificIAMPermission&quot;,
              &quot;Effect&quot;: &quot;Allow&quot;,
              &quot;Principal&quot;: {
                  &quot;AWS&quot;: &quot;arn:aws:iam::111111111111:user/iam-user&quot;
              },
              &quot;Action&quot;: &quot;s3:*&quot;,
              &quot;Resource&quot;: [
                  &quot;arn:aws:s3:::bucketname&quot;,
                  &quot;arn:aws:s3:::bucketname/*&quot;
              ]
          }
      ]
  }
  </code></pre>
  <p>However, this setting gives an access denied error.<br />
  Buckets and IAM users are in the same AWS account.<br />
  By the way, if I give full access permission of S3 in the policy setting of IAM, it works properly.</p>
  <p>Is there a way to access with only S3 bucket policy without giving any &quot;Permission Policy&quot; to IAM users?<br />
  If you know anything, I'd be happy to let you know.</p>
  <p>Thank you!</p>
  <hr />
  <p>Additional description</p>
  <pre><code>{
      &quot;Version&quot;: &quot;2012-10-17&quot;,
      &quot;Statement&quot;: [
          {
              &quot;Sid&quot;: &quot;SpecificIAMPermission&quot;,
              &quot;Effect&quot;: &quot;Allow&quot;,
              &quot;Principal&quot;: {
                  &quot;AWS&quot;: &quot;*&quot;
              },
              &quot;Action&quot;: &quot;s3:*&quot;,
              &quot;Resource&quot;: [
                  &quot;arn:aws:s3:::bucketname&quot;,
                  &quot;arn:aws:s3:::bucketname/*&quot;
              ]
          }
      ]
  }
  </code></pre>
  <p>I can access the image data from the web browser by writing the code as above.<br />
  However, access will be denied if I execute PutObject processing in the server-side implementation.</p>
  <p>I tried to give PutObjectACL permission to IAM user, but access was denied.<br />
  <a href="https://i.stack.imgur.com/l6DsZ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l6DsZ.png" alt="enter image description here" /></a></p>