title: AWS S3 object listing
body: <p>I am using aws-sdk using node.js. I want to list images in specified folder e.g.<img src="https://i.stack.imgur.com/HM9x1.png" alt="This is the directory that i want to fetch"></p>
  
  <p>I want to list all files and folder in this location but not folder (images) content. There is <a href="http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#listObjects-property">list Object function</a> in aws-sdk but it is listing all the nested files also.</p>
  
  <p>Here is the code :</p>
  
  <pre><code>var AWS = require('aws-sdk');
  AWS.config.update({accessKeyId: 'mykey', secretAccessKey: 'mysecret', region: 'myregion'});
  var s3 = new AWS.S3();
  
  var params = { 
    Bucket: 'mystore.in',
    Delimiter: '',
    Prefix: 's/5469b2f5b4292d22522e84e0/ms.files' 
  }
  
  s3.listObjects(params, function (err, data) {
    if(err)throw err;
    console.log(data);
  });
  </code></pre>