Skip to content

Commit 0fe53e5

Browse files
committed
adds ssl to example code
connecting to AWS MQTT without TLS may not be possible
1 parent b8a9ba5 commit 0fe53e5

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

examples/aws_iot_shadows.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ def message(client, topic, msg):
141141
client = MQTT.MQTT(
142142
broker=secrets["broker"],
143143
client_id=secrets["client_id"],
144+
is_ssl=True,
144145
socket_pool=pool,
145146
ssl_context=ssl_context,
146147
)

examples/aws_iot_simpletest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ def message(client, topic, msg):
138138
client = MQTT.MQTT(
139139
broker=secrets["broker"],
140140
client_id=secrets["client_id"],
141+
is_ssl=True,
141142
socket_pool=pool,
142143
ssl_context=ssl_context,
143144
)

0 commit comments

Comments
 (0)