AWS Cognito Invalid identity pool configuration

前端 未结 7 852
半阙折子戏
半阙折子戏 2020-12-31 02:10

I am using the AWS Javascript API and trying to get the assigned cognito id:

AWS.config.credentials.get(function(err) {
    if (!err) {
        console.log(\         


        
7条回答
  •  死守一世寂寞
    2020-12-31 02:39

    I checked the Trust Relationship of my roles configured for "Authenticated role" and "Unauthenticated role" for my identity pool more than once, but still the error occured. After reviewing my whole identity pool configuration I recognized that in

    • Authentication providers
      • Cognito
        • Authenticated role selection

    I have chosen "Choose role from token" and my wrong configured role was the one I attached to the cognito group for my users. So updating the Trust Relationship for this role fixed the problem.

    Hope this helps someone :)

提交回复
热议问题