title: How to get objects from a folder in an S3 bucket
body: <p>I am trying to traverse all objects inside a specific <strong>folder</strong> in my S3 bucket. The code I already have is like follows:</p>
  
  <pre><code>s3 = boto3.resource('s3')
  bucket = s3.Bucket('bucket-name')
  for obj in bucket.objects.filter(Prefix='folder/'):
      do_stuff(obj)
  </code></pre>
  
  <p>I need to use <code>boto3.resource</code> and <strong>not</strong> <code>client</code>. This code is not getting any objects at all although I have a bunch of text files in the folder. Can someone advise?</p>