代码之家  ›  专栏  ›  技术社区  ›  Suhas Kumar

从Javascript sdk访问AWS Athena

  •  0
  • Suhas Kumar  · 技术社区  · 7 年前

    我试图使用未经授权的Cognito IAM角色从Javascript SDK连接Athena,但我遇到了AccessDenied异常。使用相同的设置,我可以访问S3和dynamodb。 我已经为S3和Athena提供了池角色的权限,以进行未经授权的访问。

    Error: User: arn:aws:sts::11xxxxxxxxx:assumed-role/Cognito_Pool1Unauth_Role/CognitoIdentityCredentials is not authorized to perform: athena:StartQueryExecution
    
    // A lot of useless lines
    
    at constructor.callListeners (aws-sdk.min.js:2) "AccessDeniedException: User: arn:aws:sts::11xxxxxxxxx:assumed-role/Cognito_Pool1Unauth_Role/CognitoIdentityCredentials is not authorized to perform: athena:StartQueryExecution
    

    是不是我们不能使用Cognito未经授权的池Id从Javascript连接Athena?我想我们应该可以。我们还需要做其他设置吗?

    1 回复  |  直到 7 年前
        1
  •  0
  •   Suhas Kumar    7 年前

    通过JS sdk映射的角色似乎有问题。对于迪纳摩和其他服务来说,它工作得很好。通过指定具有权限的角色,它可以工作。