use AwsS3S3Client;
use AwsS3ExceptionS3Exception;
$bucket = "bucket";
$keyname = "keyname";
$s3 = new S3Client([
'version' => 'latest',
'region' => 'region'
]);
$result = $s3->deleteObject(array(
'Bucket' => $bucket,
'Key' => $keyname
));