title: How to debug AWS S3 "Access Denied"
body: <p>I have a rails app with Paperclip hosted on Heroku (although I'm only testing locally right now)</p>
  
  <p>I have created a bucket and a user with the <code>AmazonS3FullAccess</code> policy directly attached.</p>
  
  <p>I have the following in development .rb</p>
  
  <pre><code>  config.paperclip_defaults = {
     storage: :s3,
     s3_credentials: {
      bucket: ENV.fetch('S3_BUCKET_NAME'),
      access_key_id: ENV.fetch('AWS_ACCESS_KEY_ID'),
      secret_access_key: ENV.fetch('AWS_SECRET_ACCESS_KEY'),
      s3_region: ENV.fetch('AWS_REGION'),
     }
   }
  </code></pre>
  
  <p><strong>However, when I try to attach a profile image to my model, I just get:</strong>
  <code>Aws::S3::Errors::AccessDenied (Access Denied):</code></p>
  
  <p>How can I go about debugging this problem? I have deleted and re-created both my IAM user and my bucket, but I cannot figure out where I'm going wrong.</p>
  
  <p>Any insights into how to figure out what I'm missing?</p>