gpt4 book ai didi

ios - S3TransferManager-示例 | IAM getList 政策问题

转载 作者:行者123 更新时间:2023-11-29 10:32:52 24 4
gpt4 key购买 nike

我在调用 getList 时遇到此错误:

S3TransferManagerSample[1717:48308] listObjects 失败:[Error Domain=com.amazonaws.AWSS3ErrorDomain Code=1“操作无法完成。(com.amazonaws.AWSS3ErrorDomain 错误 1。)”UserInfo=0x7fb71412d300 {HostId= qhjcOyYAPQjHhJIX5REMTN5A48ecxIkHCqt6fFwkQPBff+tKWnML9A4yQobq2C38, Message=Access Denied, Code=AccessDenied, RequestId=B6920900AB17C864}]

我创建了 2 个角色,一个是 auth,另一个是 un-auth。以下是两个角色的内联策略:

RoleARN: Cognito_(projectName)Auth_Role
oneClick_Cognito_(projectName)Auth_Role_1424434616386: {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"mobileanalytics:PutEvents",
"cognito-sync:"
],
"Resource": [
""
]
}
]
}

policygen-Cognito_(projectName)Auth_Role-201502201739: {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1424435859000",
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:ListBucket",
"s3:PutObject"
],
"Resource": [
"arn:aws:s3:::(bucket name)/*"
]
}
]
}

RoleARN: Cognito_(projectName)Unauth_Role
oneClick_Cognito_(projectName)Unauth_Role_1424434555837: {
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"mobileanalytics:PutEvents",
"cognito-sync:"
],
"Resource": [
""
]
}
]
}

policygen-Cognito_(projectName)Unauth_Role-201502201743: {
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Stmt1424436103000",
"Effect": "Allow",
"Action": [
"s3:GetObject",
"s3:ListBucket",
"s3:PutObject"
],
"Resource": [
"arn:aws:s3:::(bucket name)/*"
]
}
]
}

有人可以指导我吗?

最佳答案

ListBucket 需要为存储桶授予权限,而不是为存储桶中的键授予权限。你应该看看this blog了解更多详情。

关于ios - S3TransferManager-示例 | IAM getList 政策问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28712047/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com