You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Create an IAM role and asign predefined `AWSIoTDataAccess` policy. (It is better to use [AWS Cognito](https://aws.amazon.com/cognito/) to provide temprerary credentiels for the front-end application, you can also customize policy to allow access only to user specific topics)
14
+
1. Create an IAM role and asign predefined `AWSIoTDataAccess` policy. (It is better to use [AWS Cognito](https://aws.amazon.com/cognito/) to provide temporary credentials for the front-end application, you can also customize policy to allow access only to user specific topics).
15
15
2. Run AWS CLI command `aws iot describe-endpoint` to get IoT endpoint url.
16
-
3. Create `mqttClient` with AWS credentials
16
+
3. Create `mqttClient` with AWS credentials.
17
17
````js
18
18
constmqttClient=newAWSMqtt({
19
19
accessKeyId:AWS_ACCESS_KEY,
@@ -23,7 +23,7 @@ const mqttClient = new AWSMqtt({
Based on [Serverless JS-Webapp Pub/Sub with AWS IoT](http://stesie.github.io/2016/04/aws-iot-pubsub) article by [Stefan Siegl](https://github.com/stesie)
45
-
This library is a wrapper around [MQTT.js](https://github.com/mqttjs/MQTT.js) npm package.
44
+
Based on [Serverless JS-Webapp Pub/Sub with AWS IoT](http://stesie.github.io/2016/04/aws-iot-pubsub) article by [Stefan Siegl](https://github.com/stesie). This library is a wrapper around [MQTT.js](https://github.com/mqttjs/MQTT.js) npm package.
0 commit comments