title: Django retrieval of list of files in S3 bucket
body: <p>I am currently working with the way django interacts with S3. I have found the boto library helpful, but was interested in creating a function to return the name of the list of files inside a particular bucket, so I can loop through and download only a portion of them passing through a specific directory. </p>
  
  <pre><code>import boto
  from boto.s3.key import Key
  
  def get_s3_filename_list(directory):
  
      bucket_name = AWS_BUCKET_NAME
  
      conn = boto.connect_s3(
          KEY_ID,
          ACCESS_KEY
      )
  
      bucket = conn.get_bucket(bucket_name)
  
      key = bucket.get_key(directory)
  </code></pre>
  
  <p>However, the key that gets returns in None. 
  Was wondering if anyone had experience getting list of file names. </p>
  
  <p>Any advice or links would be greatly appreciated.
  Thanks! </p>