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

By Evelyn Grevelink, Published: 02/20/2018, Last Updated: 02/20/2018

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*

Product and Performance Information

1

Intel's compilers may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include SSE2, SSE3, and SSSE3 instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice.

Notice revision #20110804