This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
In order to subscribe to the AWS IoT topic over WS (over MQQT), | |
you have to make sure that your Cognito identity has a proper IoT policy attached to it. | |
More details and the message from the official AWS support: | |
https://github.com/aws/aws-amplify/issues/749 | |
This code shows how you can dynamically attach a policy to the authenticated identity. | |
Make sure that your Authenticated IAM in the Cognito User Pool has proper IoT permissions. |