How can I switch roles using Amplify?

0

Hello

Cognito User Pool allows to add user to multiple Groups. Each group can have an IAM Role assigned. I have configured two groups: Admin (precedence: 1) and Operator (precedence: 10) . Each group has an IAM Role assignment.

I have Cognito Identity Pool configured with Cognito User Pool as an Identity Source and I have "Role from Token" selected.

In my Vue app, I have Amplify configured to use Cognito User and Identity Pools.

I can sign in with my user credentials and my app (via Amplify) is using AWS temporary credentials related to cognito:prefered_role (the one assigned to Cognito group with the lowest precedence). I can see "cognito:groups" attribute in ID token generated by Cognito with all Groups my user is a member of, and "cognito:roles" with all IAM Roles available for this user.

The question is: How can I switch to other roles using apmplify?

답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠