I have tried the following two methods but both of them still allow the file to be accessed using a URL such as https://bucket-example.s3.amazonaws.com/mwnl.json
(The URL is just an example)
$result = $s3Client->putObject(array(
'ACL' => 'private',
'Bucket' => $bucket,
'Key' => 'mwnl.json',
'Body' => $json
));
and...
$result = $s3Client->putObjectAcl(array(
'ACL' => 'private',
'Bucket' => $bucket,
'Key' => 'mwnl.json',
'Body' => $json
));