title: Amazon S3 upload Access Denied
body: <p>I have been stuck on this for ages. I see others have had the same problem, but I cannot fix it.</p>
  
  <p>I am developing an Android app, which takes a picture from the camera, and uploads it the a bucket on Amazon S3. Here is my code:</p>
  
  <pre><code>  CognitoCachingCredentialsProvider credentialsProvider = new CognitoCachingCredentialsProvider(
                  getApplicationContext(),    /* get the context for the application */
                  "MY_POOL_ID",    /* Identity Pool ID */
                  Regions.US_EAST_1           /* Region for your identity pool--US_EAST_1 or EU_WEST_1*/
          );
  
  
          // Create an S3 client
          AmazonS3 s3 = new AmazonS3Client(credentialsProvider);
  
          s3.setRegion(Region.getRegion(Regions.US_EAST_1));
  
          TransferUtility transferUtility = new TransferUtility(s3, getApplicationContext());
  
          TransferObserver observer = transferUtility.upload(
                  MY_BUCKET,     /* The bucket to upload to */
                  OBJECT_KEY,    /* The key for the uploaded object */
                  f        /* The file where the data to upload exists */
          );
  </code></pre>
  
  <p>I have created a bucket. The file <code>f</code>, I converted a Bitmap from the camera to a file.  My Pool ID works, if I change it I get an error <code>pool not found</code>; same with the bucket.  However every time I try to upload I get this error:</p>
  
  <blockquote>
    <p>Failed to upload: 11 due to Access Denied (Service: Amazon S3; Status
    Code: 403; Error Code: AccessDenied; Request ID: FD1B30F)</p>
  </blockquote>
  
  <p>I am a beginner with Amazon S3, and I am following their instructions again and again, but I cannot fix this.</p>
  
  <p>I have this in manifest:</p>
  
  <pre><code>&lt;service
  
  
  android:name="com.amazonaws.mobileconnectors.s3.transferutility.TransferService"
          android:enabled="true" /&gt;
  </code></pre>
  
  <p>and the correct permissions.</p>
  
  <p>What do I need to do to correct this?</p>