This is the companion example for the tutorial: How to Connect to AWS IoT Core using MQTT & ALPN. Please refer to this tutorial for the details.
- Follow the Amazon video tutorial
- Download AmazonRootCA1.pem and save the certificate in the www directory.
- Unzip connect_device_package.zip
- Copy Demo_Thing.cert.pem and Demo_Thing.private.key to the www directory
- Open start.sh (from the ZIP file) in an editor; copy the MQTT broker name (the name is after the -e option)
- Open www/.preload in an editor; Set the broker name in the empty string: awsBroker = ""
- Run the example
This example is compatible with the Mako Server and Xedge32. See the tutorial How to connect ESP32 to AWS IoT Core Using MQTT if you are using an ESP32.
Run the example, using the Mako Server, as follows:
cd AWS-MQTT
mako -l::www
For detailed instructions on starting the Mako Server, check out our command line video tutorial and review the server's command line options in our documentation.