我需要更改哪些权限才能列出所有s3存储桶?
我可以运行:aws s3 ls s3://bucketname;
但我无法运行:aws s3 ls;
存储桶策略是这样的:
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Sid",
"Effect": "Allow",
"Principal": {
"AWS": [
"arn:aws:iam::6666666:user/myuser"
]
},
"Action": [
"s3:ListBucket"
],
"Resource": "arn:aws:s3:::bucketname"
}
]
}
答案 0 :(得分:0)
应归功于该帖子:https://stackoverflow.com/a/35746318/1242581
我需要对用户或用户组执行ListAllMyBuckets
操作:
{
"Sid": "AllowListingOfAllBuckets",
"Effect": "Allow",
"Action": [
"s3:ListAllMyBuckets"
],
"Resource": [
"arn:aws:s3:::*"
]
}