title: What is recommended way to access Private S3 bucket from android app
body: <p>We have S3 buckets which is private. s3 bucket is created manually and files in it uploaded by our .net server (files are also private) And we want to access these private files securely in android app. We did not have any login/sigup in app. </p>
  
  <p>I am using following approach for it </p>
  
  <pre><code>1. Created identity pool and enabled access to unauthenticated identities as there is no any login in our app
  2. Configured IAM role. for unAuth role, added inline policy to have full aceess to s3 bucket 
  </code></pre>
  
  <p>And i am using following aws sample to test approach</p>
  
  <p><a href="https://github.com/awslabs/aws-sdk-android-samples/tree/master/S3TransferUtilitySample" rel="nofollow noreferrer">https://github.com/awslabs/aws-sdk-android-samples/tree/master/S3TransferUtilitySample</a></p>
  
  <p>My question is that</p>
  
  <ol>
  <li>Is it a right approach as files has copyrighted information and one should not able to hack bucket and receive all files without paying for it..</li>
  <li>above sample GitHub example is not working and giving error as access denied, but if i make bucket public, then I am able to access public files only, not private files. So, does this approach is not for private bucket ?</li>
  </ol>
  
  <p>Thanks in advance. </p>