AWS Cognito SMS Role : Cannot create or assign a new role

▼魔方 西西 提交于 2019-12-06 05:06:31

问题


I am not able to get verification codes(sms) and mobile app. i deleted the role. i tried recreating the role in cognito but it doesn't give any option to do so.

Error response while i create new user : "Role does not have trust relationship allowing cognito to assume the role"

On saving the verification settings on my cognito (with the previous role arn stuck in there) it say "Your roles are still being created"

Error while saving verification changes


回答1:


I too faced the same issue. Let me share the method in which i solved it, Although not the optimal method, i think, but i hope it helps:

1) I had another cognito userpool, in which i hadn't created the sms role and under that userpool i created the SMS role with same name as the name of the SMS role i deleted(Just to let aws create the roles and policy by itself, and because i am lazy ;-)).

2) Under the newly created SMS Role's trust relationship condition, i substituted the externalID with my main userpool's externalID.

You can get the externalID using aws cli.

aws cognito-idp describe-user-pool --user-pool-id <user-pool-id>

Or you can create SMS service role with the same name and attach SNS write policy with it and create trust relationship with your cognito userpool, to let it assume the role.

Hope it helps. Cheers.



来源:https://stackoverflow.com/questions/41406541/aws-cognito-sms-role-cannot-create-or-assign-a-new-role

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!