Stephen Borsay
Published © GPL3+

Almost Real-Time Analytics with AWS and the Soracom Wio LTE

This project will show you how to program and connect your Soracom Wio LTE to AWS IoT using the Soracom Beam service and an Arduino Sketch

IntermediateWork in progress3 hours1,122
Almost Real-Time Analytics with AWS and the Soracom Wio LTE

Things used in this project

Hardware components

Wio LTE US Version - 4G, Cat.1, GNSS, JavaScript(Espruino) Compatible
Seeed Studio Wio LTE US Version - 4G, Cat.1, GNSS, JavaScript(Espruino) Compatible
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable

Software apps and online services

Arduino IDE
Arduino IDE
Amazon Web Services AWS IoT
SORACOM Beam - Data Transfer Support
SORACOM Beam - Data Transfer Support


Read more


WIo LTE Docs and github


Lambda Function in Node.js

This is our Lambda function for data enrichment using AWS IoT Anlytics. No additional Node modules are needed.
// Handler called by IoT Analytics
exports.handler = function handler(event, context, callback) {
//add timesteamp to incoming data and name it "ServersideTimestam"
        event[0].ServersideTimestamp =;
        // Return the data        
        callback(null, event);
 //   });

Graphing website to be hosted on S3

This is our static website to be hosted on S3 which reads data from IoT Analytics held in a partition on S3. The webpage ingests data with an AJAX GET, then parses the data with RegEx's placing the data into arrays for each variable. Finally, the data is graphed using Google Charts brought in to our website from a CDN. Make sure to keep this in a public bucket, giving everyone read permission unless you want to customize it with API Gateway or assign federated or other access with Cognito. Do not store passwords or other sensitive information in a public S3 partition.
<!DOCTYPE html>
<!–– project by Stephen Borsay for Soracom AWS Contest  ––> 
<!–– My AWS IoT Course on Udemy ––> 
    <script type="text/javascript" src=""></script>
  <script src=""></script>
  <div id="chart_div"></div>
$.get( "", function( data ) {
		//alert( "Data Loaded: " + data );
		var temperature = data.match( /(?<=^")[0-9.]+/gm );
		var humidity = data.match( /(?<=^"\d\d",")[0-9.]+/gm );
		var timestamps = data.match( /(?<=^"\d\d","\d\d",")[0-9.]+/gm )
		//use a string literal to output our values before graphing
		alert(`Values in our temerature array to grap ${temperature}`);
		alert(`Valuesin our humidity array to graph ${humidity}`);
		alert(`Values in our timestamp array to graph ${timestamps}`);
google.charts.load('current', {packages: ['corechart', 'line']});
function drawBasic() {
      var data = new google.visualization.DataTable();
      data.addColumn('number', 'time');
      data.addColumn('number', 'temperature');
      data.addColumn('number', 'humidity');
//the followig three loops convert our strings in into numbers      
for(var ts=0; ts<timestamps.length;ts++) timestamps[ts] = parseInt(timestamps[ts], 10);
for(var tem=0; tem<temperature.length;tem++) temperature[tem] = parseInt(temperature[tem], 10);
for(var hum=0; hum<humidity.length;hum++) humidity[hum] = parseInt(humidity[hum], 10);
for (i = 0; i < timestamps.length; i++) { 
      var options = {
        hAxis: {
          title: 'Time'
        vAxis: {
          title: 'Environmental Data'
      var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
      chart.draw(data, options);
<img src="YOUR_IMAGE.jpg" alt="Your Soracom AWS Project"> 
<button>Press to display our most recent data</button>

My AWS IoT Github

This link points to the code for this project, as well as other projects utilizing Mongoose OS, Zerynth, and Node-Red etc. All are related to AWS-IoT

MQTT Data to AWS IoT - No Sensor

This Arduino sketch (mqtt-client2.ino) connects your Wio LTE to AWS IoT Core if you don't have an external sensor. It generates a fake data JSON data package to publish to AWS IoT Core.

MQTT Data to AWS IoT -DHT Sensor

This Sketch (mqtt-dht11.ino) connects to AWS IoT from the Wio LTE utilizing real sensor data from a connected DHT device.


Stephen Borsay

Stephen Borsay

1 project • 70 followers
Computer Engineer: Embedded Systems and IoT. AWS IoT Hero


Add projectSign up / Login