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);
});
var params = {
Bucket: 'STRING_VALUE', /* required */
Prefix: 'STRING_VALUE' // Can be your folder name
};
s3.listObjectsV2(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});