I am using aws-sdk using node.js. I want to list images in specified folder e.g.
Alternatively you can use minio-js client library, its open source & compatible with AWS S3 api.
You can simply use list-objects.js example, additional documentation are available at https://docs.minio.io/docs/javascript-client-api-reference.
var Minio = require('minio')
var s3Client = new Minio({
endPoint: 's3.amazonaws.com',
accessKey: 'YOUR-ACCESSKEYID',
secretKey: 'YOUR-SECRETACCESSKEY'
})
// List all object paths in bucket my-bucketname.
var objectsStream = s3Client.listObjects('my-bucketname', '', true)
objectsStream.on('data', function(obj) {
console.log(obj)
})
objectsStream.on('error', function(e) {
console.log(e)
})
Hope it helps.
Disclaimer: I work for Minio