我需要授予用户访问权限以获取一个存储桶的 AccelerateConfiguration。我设置了以下权限:
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "VisualEditor0",
"Effect": "Allow",
"Action": [
"s3:ListBucket",
"s3:GetAccelerateConfiguration",
"s3:GetBucket*"
],
"Resource": "arn:aws:s3:::some-bucket"
},
{
"Sid": "VisualEditor1",
"Effect": "Allow",
"Action": [
"s3:PutObject",
"s3:GetObjectAcl",
"s3:GetObject",
"s3:DeleteObject",
"s3:PutObjectAcl"
],
"Resource": "arn:aws:s3:::some-bucket/*"
}
]
}
并尝试此代码:
s3 = boto3.client('s3')
response = s3.get_bucket_accelerate_configuration(
Bucket='some-bucket'
)
print(response)
但出现如下错误:
botocore.exceptions.ClientError: An error occurred (AccessDenied) when calling the GetBucketAccelerateConfiguration operation: Access Denied
需要设置哪些操作才能获得访问权限?