Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NotAuthorizedException occurred when calling the SetIdentityPoolRoles #40

Open
luandro opened this issue May 4, 2016 · 4 comments
Open

Comments

@luandro
Copy link

luandro commented May 4, 2016

Everything else seems to have worked correctly but I'm getting this error which I can't figure out. Seems to be a duplicate of #4, but he doesn't really explain how he solved it.

A client error (NotAuthorizedException) occurred when calling the SetIdentityPoolRoles operation: Access to Role 'arn:aws:iam::****-****-****:role/Cognito_LambdAuthUnauth_Role' is forbidden. 

And I believe because of it I get many errors when creating the Lambda calls

A client error (ValidationException) occurred when calling the CreateFunction operation: 1 validation error detected: Value 'arn:aws:iam::****-****-****:role/LambdAuthChangePassword' at 'role' failed to satisfy constraint: Member must satisfy regular expression pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+

A client error (ValidationException) occurred when calling the CreateFunction operation: 1 validation error detected: Value 'arn:aws:iam::****-****-****:role/LambdAuthCreateUser' at 'role' failed to satisfy constraint: Member must satisfy regular expression pattern: arn:aws:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@\-_/]+

Is there something I need to setup in IAM roles?

@russellday
Copy link

I think you might be supplying the wrong value in your config file for AWS Account ID? Is ***** all numeric?

@luandro
Copy link
Author

luandro commented May 4, 2016

I'm sure that value is right. All numeric.

@luandro
Copy link
Author

luandro commented May 4, 2016

This is what the guy from #4 said he did to fix it. But I can't really make sense of it.

I noticed that the IAM roles associated with my Cognito identiy pool didn't look right so I updated the role associations to what I believe it's supposed to be be and it started working! :)

@svnm
Copy link

svnm commented Feb 19, 2017

For me I was passing in my user access key instead of the AWS_ACCOUNT_ID which is all numeric as mentioned above. Passing in the numeric account id fixed it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants