【发布时间】:2021-09-17 09:21:38
【问题描述】:
enter code heregetting:调用 ListBuckets 操作时发生错误(AccessDenied):访问被拒绝
但我有一个 IAM 策略集并使用带有该策略的 --profile 的 aws CLI。 IAM 政策:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": "s3:ListBucket",
"Resource": "arn:aws:s3:::my-repository"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"s3:GetObjectAcl",
"s3:GetObject",
"s3:GetObjectTagging",
"s3:DeleteObject"
],
"Resource": "arn:aws:s3:::my-repository/data/*"
}
]
}
aws --profile my-repository s3 ls
An error occurred (AccessDenied) when calling the ListBuckets operation: Access Denied
【问题讨论】:
标签: amazon-s3 amazon-iam policy