How to Send Data from ESP8266 to AWS IoT Core using MQTT.

Toru Eguchi
7 min readMay 9, 2020

Because of network quality and device miniaturization, IoT has been in the news lately. In addition, major clouds, such as AWS, GCP and Azure provides many functions that enables user to create an IoT service.

However, some users do not have enough experience on connection between device and cloud because they have more focused on device and cloud. So this article explains how to connect device and cloud especially, Arduino with ESP8266 (EPS32) and AWS IoT.

Overview

Until the end of this article, you can send data securely from Arduino to AWS IoT core using MQTT protocol. If you can send data, you can do many things. Hook lambda function with data and save it to DynamoDB or S3. If you want, you can analyze with AWS IoT analytics.

What you need

  • Arduino with ESP8266 or ESP32
  • Arduino IDE
  • PC
  • Cable between PC and Arduino
  • AWS account

Even if you don’t have devices, you can imitate Arduino request in AWS IoT. But I strongly recommend to buy them…

--

--

Toru Eguchi

I am a full-stack engineer. I have strength on frontend (React, Vue, Next.js…) and on backend (express, fastify and Ruby on Rails).