我在 account 中有一个批处理作业,在 account 中有一个A
bucket B
。当我的工作请求s3:GetBucketLocation
时,它会返回Access Denied
。
我已经在我的批处理作业(帐户)上设置了这样的权限A
:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Resource": [
"arn:aws:s3:::bucket-in-account-B",
"arn:aws:s3:::bucket-in-account-B/*"
]
}
]
}
和存储桶权限(帐户B
):
{
"Version": "2012-10-17",
"Statement": [
...,
{
"Sid": "123",
"Effect": "Allow",
"Principal": {
"AWS": "arn:aws:iam::{{numbers}}:role/{{name}}"
},
"Action": [
"s3:GetObject",
"s3:ListBucket",
"s3:GetBucketLocation"
],
"Resource": [
"arn:aws:s3:::bucket-in-account-B",
"arn:aws:s3:::bucket-in-account-B/*"
]
}
]
}
这些权限不起作用。