I am trying to delete objects that exist in S3 bucket sub folder. Below is what I am trying to do in C#:
string subBucketName = "TS-AP";
var amazonS3Client = new AmazonS3Client(accessKeyId, secretAccessKey, RegionEndpoint.GetBySystemName(region));
amazonS3Client.DeleteObjectAsync(new Amazon.S3.Model.DeleteObjectRequest() { BucketName = BucketName, Key = subBucketName + "/" + d.StoredFileName});
In the above code, subBucketName is the sub folder inside S3 bucket so my bucketName is “Connect” and the sub folder name is “TS-AP”. The file that I want to delete exists in “TS-AP” sub folder. when I run the above code, the code does not throw any error, it just runs, but I don’t see the files deleted in the S3 bucket.
any help will be appreciated.