+(see sample policy)
+
+{
+ "Version": "2012-10-17",
+ "Statement": [
+ {
+ "Effect": "Allow",
+ "Action": [
+ "iot:Publish",
+ "iot:Receive"
+ ],
+ "Resource": [
+ "arn:aws:iot:region:account:topic/test/topic"
+ ]
+ },
+ {
+ "Effect": "Allow",
+ "Action": [
+ "iot:Subscribe"
+ ],
+ "Resource": [
+ "arn:aws:iot:region:account:topicfilter/test/topic"
+ ]
+ },
+ {
+ "Effect": "Allow",
+ "Action": [
+ "iot:Connect"
+ ],
+ "Resource": [
+ "arn:aws:iot:region:account:client/test-*"
+ ]
+ }
+ ]
+}
+
+
+
+To Run this sample, use the following command:
```sh
# Windows Platform: Windows command prompt does not support single quote, please use double quote.
-mvn compile exec:java -pl samples/BasicPubSub -Dexec.mainClass=pubsub.PubSub -Dexec.args='--endpoint