【发布时间】:2023-03-19 18:23:02
【问题描述】:
我正在尝试通过 AWS CLI 设置 AWS 组策略,如下所示:
aws iam put-group-policy --group-name my-group --policy-name \
s3-full-access --policy-document /tmp/policy.json
这是/tmp/policy.json的内容:
{
"Version": "2012-10-17",
"Statement": [
{
"Action": [
"s3:ListAllMyBuckets"
],
"Effect": "Allow",
"Resource": "arn:aws:s3:::*"
},
{
"Action": "s3:*",
"Effect": "Allow",
"Resource": "arn:aws:s3:::my-bucket*"
}
]
}
我不断收到以下错误:
A client error (MalformedPolicyDocument) occurred when calling the PutGroupPolicy operation: The policy is not in the valid JSON format.
我不知道如何继续,错误太不具体了。有谁能帮忙吗?
【问题讨论】: