刚开始学习了解AWS的方法,我正在通过他们的教程来设置S3存储桶上的静态网站托pipe。 他们提供的方向假定使用控制台GUI,而我试图通过CLI来做到这一点,所以我可以在以后编写脚本来自动configuration一些常见的方面。 我已经得到了尽可能写我想附加到存储桶的logging.json策略文件,当发生这种情况。
aws s3api put-bucket-logging --bucket logs.my-bucket.com --bucket-logging-status file://logging.json An error occurred (UnsupportedArgument) when calling the PutBucketLogging operation: The request contained an unsupported argument.
这里是有问题的logging.json文件:
{ "LoggingEnabled": { "TargetBucket": "logs.my-bucket.com", "TargetPrefix": "bucketLogs/", "TargetGrants": [ { "Grantee": { "Type": "AmazonCustomerByEmail", "EmailAddress": "[email protected]" }, "Permission": "FULL_CONTROL" }, { "Grantee": { "Type": "Group", "URI": "http://acs.amazonaws.com/groups/global/AllUsers" }, "Permission": "READ" } ] } }
我已经确定logs.my-bucket.com存储桶已经存在,但是它也显示出一些意想不到的行为,因为它在GUI控制台中查看时会给我一个“拒绝访问”错误消息。