Skip to content

Instantly share code, notes, and snippets.

@willcharlton
Forked from lashex/aws-iot-mosquitto
Created May 28, 2019 19:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save willcharlton/6da0fcb484ebe8c2de55c3390b6f9e97 to your computer and use it in GitHub Desktop.
Save willcharlton/6da0fcb484ebe8c2de55c3390b6f9e97 to your computer and use it in GitHub Desktop.
Example Mosquitto CLI pub/sub using AWS IoT MQTT endpoint
The Mosquitto Pub CLI
$> mosquitto_pub --cert thing-0.pem --key thing-0.prv --cafile aws-iot-rootCA.crt -h XXXXXXXXYYYYY.iot.us-west-2.amazonaws.com -p 8883 -t 'test/thing' -m "Hello from Mosquitto"
The Mosquitto Sub CLI
$ mosquitto_sub --cert thing-0.pem --key thing-0.prv --cafile aws-iot-rootCA.crt -h XXXXXXXXYYYYY.iot.us-west-2.amazonaws.com -p 8883 -t 'test/+'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment