I am using official PHP SDK of Amazon S3 with official service provider for laravel. I am using version 3. The following is my code for deleting my target object:
$client = AWS::createClient('s3');
$result = $client->deleteObject(array(
'Bucket' => self::$bucketName,
'Key' => $dest
));
return $result;
And here is the return message:
Model Data
----------
Data can be retrieved from the model object using the get() method of the
model (e.g., `$result->get($key)`) or "accessing the result like an
associative array (e.g. `$result['key']`). You can also execute JMESPath
expressions on the result data using the search() method.
{
"DeleteMarker": false,
"VersionId": "",
"RequestCharged": "",
"@metadata": {
"statusCode": 204,
"effectiveUri": "https:\/\/s3-ap-southeast-1.amazonaws.com\/my-bucket-sandbox\/testing\/NjY0MA%253D%253D1481788705.jpg",
"headers": {
"x-amz-id-2": "UXlVnYeU0ID07N58C20G7yh5aKIdu7jj2QP8Ai8MZc+ay5KjAen4NHPA2oRONIAGyJXuE\/kw+Rs=",
"x-amz-request-id": "EBC374A27EE974FF",
"date": "Thu, 15 Dec 2016 08:05:47 GMT",
"server": "AmazonS3"
},
"transferStats": {
"http": [
[]
]
}
}
}
From the DeleteMarker I know the delete action has failed, but the reason is not provided in the return message. Here are some other clues:
Any suggestion on what are the possible reasons?