I use nodejs and try to delete several objects at once. But for some reason, despite the fact that no error is returned, the operation does not work properly (files are not deleted). Here is the code:
s3.deleteObjects({ Bucket: 'myprivatebucket/some/subfolders', Delete: { Objects: [ { Key: 'nameofthefile1.extension' }, { Key: 'nameofthefile2.extension' }, { Key: 'nameofthefile3.extension' } ] } }, function(err, data) { if (err) return console.log(err); console.log('success'); });
If I try to s3.deleteObject over files and use the s3.deleteObject method, then it works very well.
I also tried to specify the bucket without its subfolders (for example, "myprivatebucket"), but again I did not get the result.
Any ideas on how to make this thing work? I am using node version: 0.10.32, and aws should be 2.0.17.
Shaokan
source share