0

Once the user logs into Cognito, I would like a lambda function to get the current role associated with that user.

It seems like Cognito User pools or Identity pools are to be used with mobile apps, and front end dev?

What is the correct way of doing this? Code examples are always nice, but I'm more looking for a logical solution, or links to documentation.

I tried out AmazonCognitoIdentity (which was not what I was looking for) and read all(?) documentation around this matter but I'm not able to connect the dots here...

Baked Inhalf
  • 3,375
  • 1
  • 31
  • 45
  • Possible duplicate of [AWS Cognito Error: 'identityPoolId' failed to satisfy constraint](https://stackoverflow.com/questions/37223695/aws-cognito-error-identitypoolid-failed-to-satisfy-constraint) – helloV Oct 04 '17 at 15:06
  • @helloV It was at first, but I have updated the question – Baked Inhalf Oct 05 '17 at 07:05

1 Answers1

0

Check the question hellov linked. There are two things here, you are using GetIdentityPoolRolesRequest which targets Cognito Federated Identities and gets you the roles associated with an identity pool. It seems you want to get the roles associated with a Cognito User Pool which is completely different.

Ionut Trestian
  • 5,473
  • 2
  • 20
  • 29