Using aws-sdk 2.6.9. When I execute a successful deletion request:
s3.deleteObject({
Bucket: 'my-bucket',
Key: 'some/key/file.txt',
}, (error, result) => {
console.log(error, result);
});
error is null and result is {}. I'm pretty sure this is unexpected behavior.
No it isn't.
From http://docs.aws.amazon.com/AmazonS3/latest/API/RESTObjectDELETE.html
This implementation of the operation does not return response elements.
Then what about this?
http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/S3.html#deleteObject-property
Quote:
That seems to only apply to DELETEs in versioned buckets.
@ffxsam
@monken is correct, those fields on the data object are not guaranteed to be there. DeleteMarker and VersionID should be there when working with versioned objects, and RequestCharged should be there is the object is configured such that requesters get charged for downloads.
Good to know - thanks for clarifying!
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.
Most helpful comment
Good to know - thanks for clarifying!