AWS

The AWS IoT platform enables devices to connect to the Amazon cloud and lets applications in the cloud interact with Internet-connected things. Common IoT applications either collect and process telemetry from devices or enable users to control a device remotely. Things report their state by publishing messages, in JSON format, on MQTT topics.

For more information see this PDF Filearrow-up-right.

Getting Started with AWS IoT

Creating the message broker (Amazon website):

Setting up the device (Pycom device):

  • Download the latest sample code from the Pycom GitHub Repositoryarrow-up-right.

  • Connect to the device via FTP and put the root CA certificate, the client certificate (*.pem.crt) and the private key (*.private.pem.key) in the /flash/cert folder.

  • Update the config file with your WiFi settings, the AWS Hostarrow-up-right and the certificate paths.

  • Put the config.py and the main.py in the device flash

Configuration (config.py):

This file contains the WiFi, certificate paths and application specific settings that need to be updated by the user.

Subscibe / Publish (main.py)

To subscribe to a topic:

  • Go to the AWS Iot page, click on manage and choose your device

  • From the left hand side, choose Activity and then click MQTT client.

  • Choose the topic namearrow-up-right you entered in the configuration file.

  • Messages should be published as shown in the diagramarrow-up-right

Shadow updater (main.py)

Delta Listener (main.py)

Last updated