s3 list objects in folder node js

Solutions on MaxInterview for s3 list objects in folder node js by the best coders in the world

showing results for - "s3 list objects in folder node js"
Caitlan
17 Jan 2020
1var AWS = require('aws-sdk');
2AWS.config.update({accessKeyId: 'mykey', secretAccessKey: 'mysecret', region: 'myregion'});
3var s3 = new AWS.S3();
4
5var params = { 
6 Bucket: 'mystore.in',
7 Delimiter: '/',
8 Prefix: 's/5469b2f5b4292d22522e84e0/ms.files/'
9}
10
11s3.listObjects(params, function (err, data) {
12 if(err)throw err;
13 console.log(data);
14});