简体   繁体   中英

How to assign a specfic AWS cognito identity to user?

I need to use IoT core MQTT but it need to attach IoT policy to the identity in order to access MQTT.

From aws doc, it can be done by calling the AttachPolicy API. But I am struggling to use it successfully(see my other post ). So I am trying alternative solution to assign user a specific identity and I attach the IoT policy through AWS CLI mannually.

I know that identity will be created when GetId is called. But in my app I am using Amplify.Auth to sign up or sign in. I look through the doc and doesn't seem it mentioned when was GetId called.

Is it possible to assign a specfic identity to user when he/she is signed up or signed in?

I am not 100% confident what you are looking for but, I have set up this before. can it give you a hint?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM