title: How to list all files from a specific S3 Bucket?
body: <p>I am using AWS S3 bucket for my project where I am uploading images and listing images using APIs, which is working pretty fine.</p>
  <p>Now I want to list all files of a specific S3 bucket/folder (listing of objects of the specific bucket).</p>
  <p>Here is the screenshot of my S3 bucket:</p>
  <p><a href="https://i.stack.imgur.com/07Qp7.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/07Qp7.png" alt="s3-bucket" /></a></p>
  <p><strong>I tried to give bucket names like</strong></p>
  <ol>
  <li><code>wevieu/development/user_default/</code></li>
  <li><code>wevieu/development/user_default</code></li>
  <li><code>s3://wevieu/development/user_default/</code></li>
  </ol>
  <p>etc. but nothing helped me.</p>
  <p><strong>Most of the time I am getting this error or any other error with 400 response:</strong></p>
  <blockquote>
  <p>The specified key does not exist. (Service: Amazon S3; Status Code:
  404; Error Code: NoSuchKey;</p>
  </blockquote>
  <p>I tried <a href="https://stackoverflow.com/q/8027265/8874958">1</a> , <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/ListingKeysUsingAPIs.html" rel="nofollow noreferrer">2</a>, <a href="https://stackoverflow.com/q/38051789/8874958">3</a> solutions but didn't get help from any of this.</p>
  <p>Help me if anyone have done this before successfully.</p>
  <p><strong>Note:</strong> I am using this SDK version <em>com.amazonaws:aws-java-sdk-s3:1.11.423</em></p>