C# how to get the list of object from AWS S3 Bucket with prefix

var client = new AmazonS3Client(Amazon.RegionEndpoint.CACentral1);
var listObjectRequest = new ListObjectsRequest
{
    BucketName = "bucketname",
    Prefix = "folder/prefix" //if you want to find from sub folder, put folder name before prefix
};

var result = await client.ListObjectsAsync(listObjectRequest);

Leave a Reply