Delete image from Amazon S3 Storage

You have to use the key in this way and not just the name of the file that is to be deleted then it will work.

var s3 = AWS.S3(awsCredentials);
s3.deleteObject({
  Bucket: MY_BUCKET,
  Key: 'some/subfolders/nameofthefile1.extension'
},function (err,data){})

when you send the key dynamically, use local storage to store the key and send it dynamically to delete image

var s3 = AWS.S3(awsCredentials); 
s3.deleteObject({  
 Bucket: MY_BUCKET, 
 Key: 'yourFileKey' 
},function (err,data){})