diff --git a/README.md b/README.md index 4fc560e..d2fa139 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ -# AWS-IoT-with-Python-Paho +# Fork of AWS-IoT-with-Python-Paho -For Details please refer to following link - +All the deatails of this working project are available at the below mentioned link https://iotbytes.wordpress.com/mqtt-with-aws-iot-using-python-and-paho/ + +## Informations that are not listed in the above site are : +### There is no metion about the policy that should be attached to the certificates generated. +#### A sample policy is attached, that by default, allows all iot access to the edge device using that certificate. + diff --git a/Sample_Policy.txt b/Sample_Policy.txt new file mode 100644 index 0000000..e833403 --- /dev/null +++ b/Sample_Policy.txt @@ -0,0 +1,8 @@ +{ + "Version": "2012-10-17", + "Statement": [{ + "Effect": "Allow", + "Action":["iot:*"], + "Resource": ["*"] + }] +} diff --git a/mqtt_subscribe.py b/mqtt_subscribe.py index dbdbd8f..2936b82 100644 --- a/mqtt_subscribe.py +++ b/mqtt_subscribe.py @@ -15,7 +15,7 @@ # Define on connect event function # We shall subscribe to our Topic in this function -def on_connect(mosq, obj, rc): +def on_connect(self, mosq, obj, rc): mqttc.subscribe(MQTT_TOPIC, 0) # Define on_message event function.