title: Getting access denied error while uploading file to amazon s3 using tranferutility
body: <p>Getting the following error while running the application in logcat</p>
  <blockquote>
  <p>D/com.amazonaws.request: Received error response: com.amazonaws.services.s3.model.AmazonS3Exception: Access Denied (Service: null; Status Code: 403; Error Code: AccessDenied; Request ID: ZFW34X6QRZEBNR23), S3 Extended Request ID: cCcs8EOdirUSRRd9MyoUcMWDTjEvFLN/cqSYbAT3NCLR/hDSjxI/ATNX63Y9cbyDNABi8MnTauY=</p>
  </blockquote>
  <p>Without using tranfer utility code works fine. When using transfer utility error occurs. Kindly find the code here</p>
  <pre><code>            getApplicationContext().startService(new Intent(getApplicationContext(), TransferService.class));
      AWSMobileClient.getInstance().initialize(getApplicationContext(), new Callback&lt;UserStateDetails&gt;() {
          @Override
          public void onResult(UserStateDetails result) {
              Log.i(&quot;AWSMobile Clinet&quot;,&quot;initialised awsmobile client&quot;);
              TransferUtility transferUtility=TransferUtility.builder().context(getApplicationContext())
                      .awsConfiguration(AWSMobileClient.getInstance().getConfiguration())
                      .s3Client(new AmazonS3Client(AWSMobileClient.getInstance()))
                      .build();
              try {
                  File exampleFile = new File(&quot;/data/data/com.dieto.app/databases/user.db&quot;);
                  TransferObserver uploadObserver=transferUtility.upload( &quot;dietodata144832- 
               dev&quot;,number+&quot;.db&quot;,exampleFile);
  
              }
              catch (Exception e){
                  Log.e(&quot;File load&quot;,&quot;File load failed&quot;+e.toString());
              }
  </code></pre>