IOS

我在我的getList调用中有这个错误:

S3TransferManagerSample [1717:48308] listobjects failed:[Error Domain = com.amazonaws.AWSS3ErrorDomain Code = 1“The operation could not be completed。(com.amazonaws.AWSS3ErrorDomain error 1.)”UserInfo = 0x7fb71412d300 {HostId = qhjcOyYAPQjHhJIX5REMTN5A48ecxIkHCqt6fFwkQPBff + tKWnML9A4yQobq2C38 ,消息=访问被拒绝,代码= 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权限需要授予一个存储桶,而不是存储桶中的密钥。 你应该看看这个博客的进一步细节。

链接地址: http://www.djcxy.com/p/20103.html

上一篇: ios

下一篇: AWS IAM policy for SQS