我想使用API for PHP 2为日志传送组启用存储桶权限
$result = $client->putBucketAcl(array(
'Bucket' => $bucket . '-log',
'AccessControlList' => array(
'Grant' => array(
'Grantee' => array(
'Type' => 'Group',
'URI' => 'http://acs.amazonaws.com/groups/s3/LogDelivery',
),
'Permission' => 'WRITE',
),
'Grant' => array(
'Grantee' => array(
'Type' => 'Group',
'URI' => 'http://acs.amazonaws.com/groups/s3/LogDelivery',
),
'Permission' => 'READ_ACP',
),
),
));
以下代码的结构写在http://docs.aws.amazon.com/AmazonS3/2006-03-01/dev/LoggingHowTo.html。
执行此代码失败,但出现异常:
**Aws\S3\Exception\MissingSecurityHeaderException**
Your request was missing a required header
我找不到如何解决此异常并在存储桶上设置ACL。我错过了一些重要的事情吗?