Getting Access Denied when calling the PutObject operation with bucket-level permission
<p>I followed the example on <a href="http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_examples.html#iam-policy-example-s3" rel="noreferrer">http://docs.aws.amazon.com/IAM/latest/UserGuide/access_policies_examples.html#iam-policy-example-s3</a> for how to grant a user access to just one bucket.</p>

<p>I then tested the config using the W3 Total Cache Wordpress plugin. The test failed.</p>

<p>I also tried reproducing the problem using </p>

<pre><code>aws s3 cp --acl=public-read --cache-control='max-age=604800, public' ./test.txt s3://my-bucket/
</code></pre>

<p>and that failed with</p>

<pre><code>upload failed: ./test.txt to s3://my-bucket/test.txt A client error (AccessDenied) occurred when calling the PutObject operation: Access Denied
</code></pre>

<p>Why can't I upload to my bucket?</p>