File tree 1 file changed +26
-1
lines changed 1 file changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -94,7 +94,32 @@ Lastly, you will need a client or server bootstrap to use a client or server pro
94
94
non-blocking and event driven, this handles most of the "callback hell" inherent in the design. Assuming you aren't partitioning
95
95
threads for particular use-cases, you can have a single instance of this that you pass to multiple clients.
96
96
97
- For a working Mqtt example, see samples/mqtt_pub_sub/main.cpp.
97
+ ## Sample
98
+
99
+ For a working Mqtt example, see samples/mqtt_pub_sub/main.cpp. To run the sample, ensure that you have added
100
+ iot: Publish , iot: Receive , and iot: Subscribe permissions to your Thing's policy for topic/a/b:
101
+
102
+ ``` json
103
+ {
104
+ "Effect" : " Allow" ,
105
+ "Action" : [
106
+ " iot:Receive" ,
107
+ " iot:Publish"
108
+ ],
109
+ "Resource" : [
110
+ " arn:aws:iot:<your-region>:<your-id>:topic/a/b"
111
+ ],
112
+ },
113
+ {
114
+ "Effect" : " Allow" ,
115
+ "Action" : [
116
+ " iot:Subscribe"
117
+ ],
118
+ "Resource" : [
119
+ " arn:aws:iot:<your-region>:<your-id>:topicfilter/a/b"
120
+ ]
121
+ }
122
+ ```
98
123
99
124
## License
100
125
You can’t perform that action at this time.
0 commit comments