Skip to content

Commit 774f16b

Browse files
justinboswellJonathanHenson
authored andcommitted
Added additional sample docs (aws#8)
1 parent 2580200 commit 774f16b

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

README.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,32 @@ Lastly, you will need a client or server bootstrap to use a client or server pro
9494
non-blocking and event driven, this handles most of the "callback hell" inherent in the design. Assuming you aren't partitioning
9595
threads for particular use-cases, you can have a single instance of this that you pass to multiple clients.
9696

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+
```
98123

99124
## License
100125

0 commit comments

Comments
 (0)