Code Sample: MQTT Publication to Amazon Web Services (AWS)* with UP Squared*

This tutorial demonstrates how to use an UP Squared* board together with the Arduino Create* IDE to publish messages (sensor data) via MQTT, a messaging protocol suited for IoT applications, to the Amazon Web Services (AWS)* cloud platform.

How it Works

After you set up an Amazon Web Services (AWS) account and follow along with the detailed tutorial steps in GitHub* to register and create a certificate for a Thing (a representation of a cloud device), you’ll run a sketch in Arduino Create that reads data from a rotary angle sensor and sends it to AWS. Published messages (sensor data) can be viewed through the AWS IoT MQTT Client.

Note: for this example, you’ll use the aws-iot-device-sdk-cpp.h library (a modified version of the AWS* IoT Device SDK).

What You’ll Learn

From this code sample tutorial you’ll learn how to:

  • Setup an AWS account and Thing (a representation of a cloud device)
  • Create a certificate for your Thing to authenticate your UP Squared's connection to AWS IoT
  • View MQTT Messages (sensor data) with the AWS IoT MQTT Client

How to Get Started

Gather your materials

Hardware

Software

Create a Amazon Web Services (AWS)* Account

Create a free account or sign in to AWS here

Continue on GitHub*

For more complete information about compiler optimizations, see our Optimization Notice.