Reader small image

You're reading from  Hands-On Industrial Internet of Things

Product typeBook
Published inNov 2018
PublisherPackt
ISBN-139781789537222
Edition1st Edition
Right arrow
Authors (2):
Giacomo Veneri
Giacomo Veneri
author image
Giacomo Veneri

Giacomo Veneri graduated in computer science from the University of Siena. He holds a PhD in neuroscience context with various scientific publications. He is Predix Cloud certified and an influencer, as well as SCRUM and Oracle Java certified. He has 18 years' experience as an IT architect and team leader. He has been an expert on IoT in the fields of oil and gas and transportation since 2013. He lives in Tuscany, where he loves cycling.
Read more about Giacomo Veneri

Antonio Capasso
Antonio Capasso
author image
Antonio Capasso

Antonio Capasso graduated in computer automation in 1999 and computer science in 2003 from the University of Naples. He has been working for twenty years on large and complex IT projects related to the industrial world in a variety of fields (automotive, pharma, food and beverage, and oil and gas), in a variety of roles (programmer, analyst, architect, and team leader) with different technologies and software. Since 2011, he has been involved in building and securing industrial IoT infrastructure. He currently lives in Tuscany, where he loves trekking and swimming.
Read more about Antonio Capasso

View More author details
Right arrow

Implementing a Cloud Industrial IoT Solution with AWS

In the previous chapter, we implemented a custom I-IoT platform. We looked at some important topics, including storage, time-series, microservices, protocols, data stream processing, and batch processing. The purpose of this chapter is to explore the solutions proposed by Amazon Web Services (AWS) and the capabilities of the AWS IoT platform.

In this chapter, we will discover some of the most popular cloud solutions that apply to the I-IoT. We will cover the following topics:

  • The AWS architecture
  • AWS IoT
  • Registering for AWS
  • IoT core
  • Storing data
  • AWS analytics
  • QuickSight

Technical requirements

To follow along with this chapter, the following prerequisites should be downloaded and installed:

The code for this chapter is available at the official repository at https://github.com/PacktPublishing/Hands-On-Industrial-Internet-of-Things.

AWS architecture

In previous chapters, we designed an end-to-end standard architecture from the sensor to the operator. In this chapter, we will discover that AWS has a lot of similarities with the architecture proposed in the previous chapter; this cloud architecture is strongly based on microservices, queues, and common protocols, including HTTPS, MQTT, and REST API. From the point of view of infrastructure, AWS supports Kubernetes, Hadoop, Docker, and serverless platforms. From an IoT perspective, AWS has built its own solution: AWS IoT.

AWS IoT

AWS IoT is the IoT platform of AWS. The key components of AWS IoT are the following:

  • AWS Greengrass
  • AWS IoT Core
  • AWS IoT Analytics

Other components of AWS that are not specific...

Registering for AWS

To work with AWS, we need to register for a free tier account. Follow these steps:

  1. Open the browser and go to https://aws.amazon.com/free, then create a free account as follows:
Creating a free account in AWS
  1. We need to provide our details and our credit card information. AWS will not charge you if you are compliant with their free tier license.
  2. Connect to the AWS console at https://aws.amazon.com and provide your username and password.
  3. Finally, choose your AWS default location.
AWS suggests that you create a dedicated account for administrative purposes. In this exercise, we will use the standard root account, but for a production environment, click on the IAM service and enable an admin account.

Installing the AWS client

...

IoT Core

IoT Core is a basic service to manage devices and to receive data from an edge device. To enable IoT Core, we need to open the web console and click on IoT Core as shown in the following screenshot:

IOT Core on the AWS console

In the next sections, we are going to activate the policy to connect an external device through MQTT/MQTTS, create certificates, and register a new device (which is called a thing by AWS). AWS IoT uses X.509 certificates to enforce MQTT security.

After registration, we can implement our device on a local PC.

Setting the policies

AWS IoT applies security to protect our system. To allow a device to send data, we need to attach the following statements to the device—iot:Connect, iot:Subscribe...

Storing data

In a typical I-IoT scenario, we want to process incoming data, but also store this data in a cloud storage system. We can receive from the device unstructured data, such as images, sounds, or logs, as well as events and sensor data. In our I-IoT proposed architecture, we want to store sensor data, such as time-series data, but it is easy to extend these concepts to unstructured data as well. AWS doesn't have native support for time-series data; we suggest that you use DynamoDB for this purpose.

DynamoDB

AWS analytics

Once the devices are connected and the time-series data is stored, I-IoT data should be analyzed, processed, and visualized. AWS provides six different mechanisms to process data:

  • Serverless Lambda functions
  • Greengrass, which can be used to deploy Lambda functions on-premises
  • IoT Analytics
  • Machine learning analytics
  • Athena
  • SageMaker

Lambda analytics

Serverless Lambda functions are the easiest and most customizable form of analytics. Lambda analytics allow you to process data immediately, with powerful support for Python, Node.js, GO, C#, and Java. The easiest way to configure a Lambda function is through the AWS console as follows:

  1. From the AWS console, we have to search for Lambda and click on the Create...

QuickSight

QuickSight mainly relates to business intelligence capabilities, but also offers an easy way of IoT data visualization. Although QuickSight is not exactly related to IoT, it has great connectivity with AWS IoT Analytics and allows you to develop a user interface with just a few clicks:

  1. From the AWS console, click on the QuickSight option.
  2. The first time you click on QuickSight, it will ask you to register. Choose the free account.
  1. To enable the data source, check the box next to the Amazon IoT Analytics checkbox, as shown in the following screenshot:
Configuring QuickSight
  1. Finally, from the data set, create a new instance IoT Analytics and select our previously created dataset signals_dataset:
Creating a new AWS IoT Analytics datasource

Now, drag and drop our signal (in this case the temperature) into the autograph space:

Visualizing data with QuickSight
...

Summary

In this chapter, we explored the most common functionalities used to deliver an IoT solution with AWS. We understood the main components and the benefits. In the next chapter, we will discover the Google IoT offering.

Questions

  1. Which of the following technologies is a serverless technology?
    1. Greengrass
    2. Lambda functions
    3. Docker
  2. Which of the following technologies is a device manager technology?
    1. AWS Greengrass
    2. AWS IoT Core
    3. AWS Hub
  3. Which of the following technologies can we use for fast data processing and low latency analytics?
    1. IoT Analytics
    2. AWS Machine Learning
    3. AWS Lambda

Further reading

lock icon
The rest of the chapter is locked
You have been reading a chapter from
Hands-On Industrial Internet of Things
Published in: Nov 2018Publisher: PacktISBN-13: 9781789537222
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime

Authors (2)

author image
Giacomo Veneri

Giacomo Veneri graduated in computer science from the University of Siena. He holds a PhD in neuroscience context with various scientific publications. He is Predix Cloud certified and an influencer, as well as SCRUM and Oracle Java certified. He has 18 years' experience as an IT architect and team leader. He has been an expert on IoT in the fields of oil and gas and transportation since 2013. He lives in Tuscany, where he loves cycling.
Read more about Giacomo Veneri

author image
Antonio Capasso

Antonio Capasso graduated in computer automation in 1999 and computer science in 2003 from the University of Naples. He has been working for twenty years on large and complex IT projects related to the industrial world in a variety of fields (automotive, pharma, food and beverage, and oil and gas), in a variety of roles (programmer, analyst, architect, and team leader) with different technologies and software. Since 2011, he has been involved in building and securing industrial IoT infrastructure. He currently lives in Tuscany, where he loves trekking and swimming.
Read more about Antonio Capasso