尝试列出应用了交叉帐户存储区策略的对象时出现错误
aws s3 ls bucket-name
An error occurred (AccessDenied) when calling the ListObjectsV2 operation: Access Denied
用于允许列表对象的桶策略是:
{
"Id": "Policy2",
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt13",
"Action": [ "s3:GetBucketLocation", "s3:ListBucket" ,"s3:GetBucketPolicy"],
"Effect": "Allow",
"Resource": ["arn:aws:s3:::bucket-name"],
"Principal": {"AWS":"*"}
}
]
}
我尝试指定特定ARN的主体。假设启用了块公共访问。但这也不起作用。
答案 0 :(得分:0)
您的政策对我来说很好!
我采取的步骤:
工作正常。