我想使用 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。我错过了什么重要的东西吗?