AWS S3 object listing

0 votes

I am using AWS-SDK using node.js. I want to list images in a specified folder e.g.This is the directory that i want to fetch

There is a list Object function in AWS-SDK but it is listing all the nested files also.

Here is the 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);
});


Is it possible to list all files and folders in this location but not folder (images) content? 

Apr 23 in Others by Kichu
• 16,050 points
22 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Others

0 votes
1 answer

What does it mean when owner is None on an AWS S3 object?

S3 Object Ownership is an Amazon S3 ...READ MORE

answered Mar 15 in Others by Edureka
• 8,820 points
113 views
0 votes
1 answer

Get last modified object from S3 using AWS CLI

With aws s3 ls $BUCKET —recursive, you ...READ MORE

answered Mar 24 in Others by Edureka
• 8,820 points
66 views
+1 vote
0 answers
0 votes
1 answer
0 votes
0 answers

How to add S3 BucketPolicy with AWS CDK?

I wanna translate this CloudFormation piece into ...READ MORE

Mar 11 in Others by Edureka
• 9,320 points
123 views
0 votes
1 answer

AWS S3 uploading hidden files by default

versioning is enabled in your bucket. docs.aws.amazon.com/AmazonS3/latest/user-guide/….... the ...READ MORE

answered Oct 4, 2018 in AWS by Priyaj
• 58,060 points
3,174 views
–1 vote
1 answer

How to decrypt the encrypted S3 file using aws-encryption-cli --decrypt

Use command : aws s3 presign s3://mybucket/abc_count.png you get ...READ MORE

answered Oct 22, 2018 in AWS by Priyaj
• 58,060 points
3,475 views
0 votes
1 answer

Import my AWS credentials using python script

Using AWS Cli  Configure your IAM user then ...READ MORE

answered Nov 16, 2018 in AWS by Jino
• 5,800 points
1,872 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP