I am trying to write up some JavaScript to connect to S3 and spit out all of the directory names inside of the “data” folder. There are hundreds of “data/id=___” folders and I am trying to get a list of all of them.
From the research I have been attempting it seems like I may have to use SetDelimiter but I am pretty new to all of this and cannot quite figure it out. Can anyone point me in the right direction?
var AmazonS3ClientBuilder= Packages.com.amazonaws.services.s3.AmazonS3ClientBuilder;
var ListObjectsV2Request = Packages.com.amazonaws.services.s3.model.ListObjectsV2Request;
var bucketName = 'filtered-data';
var objectPath = 'data/id='
var s3Client = AmazonS3ClientBuilder.standard().withRegion("us-east-2").build();