title: AWS S3: An error occurred (AccessDenied) when calling the GetObject operation: Access Denied
body: <p>I have an AWS account with read/write permissions as shown below:
  <a href="https://i.stack.imgur.com/MiJO6.png" rel="noreferrer"><img src="https://i.stack.imgur.com/MiJO6.png" alt="enter image description here"></a> </p>
  
  <p>I'd like to make it so that an IAM user can download files from an S3 bucket but I'm getting access denied when executing <code>aws s3 sync s3://&lt;bucket_name&gt; .</code> I have tried various things, but not to avail. Some steps that I did: </p>
  
  <ol>
  <li>Created a user called s3-full-access</li>
  <li>Executed <code>aws configure</code> in my CLI and entered the generated access key id and secret access key for the above user</li>
  <li>Created a bucket policy (shown below) that I'd hoped grants access for my user created in first step.</li>
  </ol>
  
  <p><a href="https://i.stack.imgur.com/Hq8I1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Hq8I1.png" alt="enter image description here"></a></p>
  
  <p>My bucket has a folder name AffectivaLogs in which files were being added anonymously by various users, and it seems like though the bucket is public, the folder inside it is not and I am not even able to make it public, and it leads to following error.</p>
  
  <p><a href="https://i.stack.imgur.com/xsce1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/xsce1.png" alt="enter image description here"></a></p>
  
  <p>Following are the public access settings:</p>
  
  <p><a href="https://i.stack.imgur.com/AS2ZB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/AS2ZB.png" alt="enter image description here"></a></p>
  
  <p>Update: I updated the bucket policy as follows, but it doesn't work.</p>
  
  <p><a href="https://i.stack.imgur.com/354Yy.png" rel="noreferrer"><img src="https://i.stack.imgur.com/354Yy.png" alt="enter image description here"></a></p>