+ All Categories
Home > Technology > An Overview of AWS IoT (November 2016)

An Overview of AWS IoT (November 2016)

Date post: 16-Apr-2017
Category:
Upload: julien-simon
View: 318 times
Download: 1 times
Share this document with a friend
51
IoT on Amazon Web Services Julien Simon Principal Technical Evangelist Amazon Web Services [email protected] @julsimon 17/11/2016
Transcript
Page 1: An Overview of AWS IoT (November 2016)

IoT on Amazon Web Services Julien Simon Principal Technical Evangelist Amazon Web Services [email protected] @julsimon 17/11/2016

Page 2: An Overview of AWS IoT (November 2016)

Agenda

•  A simple definition of the Internet of Things •  IoT projects running on AWS •  The AWS IoT platform

–  Devices & SDKs –  The MQTT protocol –  Moving IoT data to the cloud –  Demo on the Arduino Yùn platform

•  Q&A

Page 3: An Overview of AWS IoT (November 2016)

The Internet of Things

Page 4: An Overview of AWS IoT (November 2016)

RESOURCE-CONSTRAINED COMPUTING DEVICES

Page 5: An Overview of AWS IoT (November 2016)

DEPLOYED IN THE THOUSANDS, MAYBE THE MILLIONS

Page 6: An Overview of AWS IoT (November 2016)

ABLE TO RUN FOR YEARS"WITHOUT HUMAN INTERVENTION

Page 7: An Overview of AWS IoT (November 2016)

COLLECTING AND SENDING "STREAMS OF DATA 24/7/365"

"and this is the real challenge in IoT !

Page 8: An Overview of AWS IoT (November 2016)

Millions of devices sending billions of

messages

Receivers Senders

Page 9: An Overview of AWS IoT (November 2016)
Page 10: An Overview of AWS IoT (November 2016)
Page 11: An Overview of AWS IoT (November 2016)

a = 2

Page 12: An Overview of AWS IoT (November 2016)

More on this later J

Page 13: An Overview of AWS IoT (November 2016)

IoT projects running on AWS

Page 14: An Overview of AWS IoT (November 2016)

AWS IoT

https://aws.amazon.com/solutions/case-studies/philips/ http://www.usa.philips.com/healthcare/articles/healthsuite-device-cloud

Page 15: An Overview of AWS IoT (November 2016)

Streaming, analysis, storage and visualization of data coming from 200,000 farming machines Precision agriculture and yield optimization for farmers New business model for John Deere

https://www.youtube.com/watch?v=uq4kQPsM4cQ

Page 16: An Overview of AWS IoT (November 2016)

“Car as a Sensor” Collect sensor data from BMW 7 Series cars to give drivers dynamically updated map information 100,000 vehicles by 2018 Service launched "in 6 months

https://aws.amazon.com/solutions/case-studies/bmw/

Page 17: An Overview of AWS IoT (November 2016)

Connected Roomba launched in 2015 More than 45 million square meters mapped Discovery and interaction with Smart Home devices

https://aws.amazon.com/solutions/case-studies/irobot/

Page 18: An Overview of AWS IoT (November 2016)

More IoT applications based on AWS

Thermomix Consumer equipment

Soitec Semiconductors

SPS Motors

Siemens Power & Gas Energy production

Veolia Water Water systems

Amazon Retail

Page 19: An Overview of AWS IoT (November 2016)

Une communication natuelle

Page 20: An Overview of AWS IoT (November 2016)

The AWS IoT Platform

Page 21: An Overview of AWS IoT (November 2016)

AWS Global Infrastructure

14 Regions 38 Availability Zones 63 Edge Locations AWS IoT available

Page 22: An Overview of AWS IoT (November 2016)

DEVICE SDK Set of client libraries to

connect, authenticate and exchange messages

DEVICE GATEWAY Communicate with devices via

MQTT and HTTP

AUTHENTICATION AUTHORIZATION

Secure with mutual authentication and encryption

RULES ENGINE Transform messages based on rules and

route to AWS Services

AWS - - - - -

3rd party

DEVICE SHADOW Persistent thing state during

intermittent connections

APPLICATIONS

AWS IoT API

DEVICE REGISTRY Identity and Management of

your things

Page 23: An Overview of AWS IoT (November 2016)

Pricing

•  No minimum fee

•  You are only charged on the number of incoming and outgoing messages

•  1 message = 512 bytes maximum

•  Free tier: 250K free messages / month for 12 months

•  No charge when delivering to Amazon S3, Amazon DynamoDB, AWS Lambda, Amazon Kinesis, Amazon SNS, and Amazon SQS.

Page 24: An Overview of AWS IoT (November 2016)

AWS IoT: Devices & SDKs

Page 25: An Overview of AWS IoT (November 2016)

Official AWS IoT Starter Kits

Page 26: An Overview of AWS IoT (November 2016)

Software platforms supported by AWS IoT

•  Arduino Yún https://github.com/aws/aws-iot-device-sdk-arduino-yun •  Javascript https://github.com/aws/aws-iot-device-sdk-js •  Embedded C https://github.com/aws/aws-iot-device-sdk-embedded-C

•  Android https://github.com/aws/aws-sdk-android/ •  iOS https://github.com/awslabs/aws-sdk-ios-samples

•  Java (07/16) https://github.com/aws/aws-iot-device-sdk-java •  Python (07/16) https://github.com/aws/aws-iot-device-sdk-python

Page 27: An Overview of AWS IoT (November 2016)

Managing things

•  Thing Registry

•  Secure Identity for Things: one certificate per thing (mandatory)

•  Secure Communications with Things: one keypair per thing (mandatory) •  Fine-grained Authorization (based on Amazon IAM)

–  Thing Management –  Access to messages –  Access to AWS services

https://aws.amazon.com/security/ https://aws.amazon.com/compliance/ https://aws.amazon.com/compliance/eu-data-protection/

Page 28: An Overview of AWS IoT (November 2016)

AWS IoT: The MQTT Protocol

Page 29: An Overview of AWS IoT (November 2016)

Protocols supported by AWS IoT

•  MQTT over HTTPS: publish and subscribe"(IPv4 and IPv6)

•  MQTT over WebSockets: publish and subscribe –  Security is managed with AWS Signatures v4

•  HTTPS publish only

Page 30: An Overview of AWS IoT (November 2016)

MQTT Protocol

MQTTS vs HTTPS:  93x faster throughput 11.89x less battery to send 170.9x less battery to receive 50% less power to stay connected 8x less network overhead

Source: http://stephendnicholas.com/archives/1217

•  OASIS standard protocol (v3.1.1) •  Lightweight transport protocol that is

useful for connected devices •  Publish-subscribe with topics

•  MQTT is used on oil rigs, connected trucks, and many more critical applications

•  Until now, customers had to build, maintain and scale a broker to use MQTT with cloud applications

Page 31: An Overview of AWS IoT (November 2016)

MQTT: device-to-device communication

mydevices/alert

Page 32: An Overview of AWS IoT (November 2016)

MQTT: collect data from a device

mydevices/4

mydevices/4

Page 33: An Overview of AWS IoT (November 2016)

MQTT: aggregate data from many devices

mydevices/#

mydevices/1 mydevices/2 mydevices/3 ….

Amazon "DynamoDB

Applications

Page 34: An Overview of AWS IoT (November 2016)

MQTT: update a device

mydevices/4

mydevices/4

Page 35: An Overview of AWS IoT (November 2016)

MQTT: QoS 0 (at most once)"

1

2

3

4

5

6 1,2,3,5,6

Publish QoS0

Page 36: An Overview of AWS IoT (November 2016)

MQTT: QoS 1 (at least once)

1

2

3

4 5

4 1,2,3,4,5,6

6

PUBLISH QoS1

PUBLISH QoS1

PUBACK

Page 37: An Overview of AWS IoT (November 2016)

MQTT.fx

http://mqttfx.jfx4ee.org/

Page 38: An Overview of AWS IoT (November 2016)

AWS IoT: Moving data to the cloud

Page 39: An Overview of AWS IoT (November 2016)

Collect Store Analyze Consume

A

iOS Android

Web Apps

Logstash

Amazon RDS

Amazon DynamoDB

Amazon ES

AmazonS3

Apache Kafka

AmazonGlacier

AmazonKinesis

AmazonDynamoDB

Amazon Redshift

Impala

Pig

Amazon ML

Streaming

AmazonKinesis

AWS Lambda

Amaz

on E

last

ic M

apR

educ

e

Amazon ElastiCache

Sear

ch

SQL

NoS

QL

Cac

he

Stre

am P

roce

ssin

g Ba

tch

Inte

ract

ive

Logg

ing

Stre

am S

tora

ge

IoT

Appl

icat

ions

File

Sto

rage

Anal

ysis

& V

isua

lizat

ion

Hot

Cold

Warm

Hot Slow

Hot

ML

Fast

Fast

Amazon QuickSight

Transactional Data

File Data

Stream Data

Not

eboo

ks

Predictions

Apps & APIs

Mobile Apps

IDE

Search Data

ETL

Page 40: An Overview of AWS IoT (November 2016)

1. AWS Services (Direct Integration)

Rules Engine

Actions

AWS IoT Rules

AWS "Lambda

Amazon "SNS

Amazon "SQS

Amazon "S3

Amazon "Kinesis

Amazon "DynamoDB Amazon RDS

Amazon "Redshift

Amazon Glacier

Amazon "EC2

3. External Endpoints"(via Lambda and SNS)

Rules connect AWS IoT to External Endpoints "and AWS Services

2. Rest of AWS"(via Amazon Kinesis, AWS Lambda, Amazon S3, and more)

Amazon CloudWatch

Amazon "Elasticsearch

Amazon Machine "Learning

Page 41: An Overview of AWS IoT (November 2016)

AWS IoT Rules Engine

Rule

Name

Description

SQL Statement

Array of Actions

Simple & Familiar Syntax -  SQL Statement to define topic filter -  Optional WHERE clause -  Advanced JSON support Many functions available -  String manipulation (regex support) -  Mathematical operations -  Crypto support -  UUID, Timestamp, rand, etc.

Page 42: An Overview of AWS IoT (November 2016)

From AWS IoT to an External Endpoint

Lambda Function

AWS Services

Execution Role Policy

External Endpoint

Permission Private Key & Certificate

Thing/Device

SDK

Rules Engine

Policy Rule

AWS IoT

Select * from ‘iotbutton/+’

Action

Page 43: An Overview of AWS IoT (November 2016)

AWS IoT Demo

Page 44: An Overview of AWS IoT (November 2016)

Personal picture

Page 45: An Overview of AWS IoT (November 2016)

Hardware Shopping List

Page 46: An Overview of AWS IoT (November 2016)

Software Shopping List Arduino IDE and librairies http://arduino.org/software Arduino Web Editor & Cloud Platform https://aws.amazon.com/blogs/aws/arduino-web-editor-and-cloud-platform-powered-by-aws/ Tip: ArduinoJson, a JSON library for embedded systems https://github.com/bblanchon/ArduinoJson

Page 47: An Overview of AWS IoT (November 2016)

Arduino: connecting to AWS IoT aws_iot_mqtt_client myClient;

if((rc = myClient.setup(AWS_IOT_CLIENT_ID)) == 0) { // Load user configuration if((rc = myClient.config(AWS_IOT_MQTT_HOST,

AWS_IOT_MQTT_PORT, AWS_IOT_ROOT_CA_PATH, AWS_IOT_PRIVATE_KEY_PATH, AWS_IOT_CERTIFICATE_PATH)) == 0) {

if((rc = myClient.connect()) == 0) {// We are connecteddoSomethingUseful();

}}

}

Page 48: An Overview of AWS IoT (November 2016)

Arduino: subscribing and publishing to a topic

if ((rc=myClient.subscribe(”myTopic", 1, msg_callback)) != 0) {

Serial.println("Subscribe failed!"); Serial.println(rc);}

if((rc = myClient.publish(”myTopic", msg, strlen(msg), 1, false)) != 0)

{Serial.println("Publish failed!");Serial.println(rc);

}

Page 49: An Overview of AWS IoT (November 2016)

Now what?

Page 50: An Overview of AWS IoT (November 2016)

Now it’s your turn!

Whitepaper: “Core Tenets of IoT” "https://d0.awsstatic.com/whitepapers/core-tenets-of-iot1.pdf Whitepaper: “Big Data Analytics Options on AWS” http://d0.awsstatic.com/whitepapers/Big_Data_Analytics_Options_on_AWS.pdf Learn more about AWS IoT https://aws.amazon.com/iot/ Learn about the AWS Free Tier https://aws.amazon.com/free/ Get started! https://aws.amazon.com/getting-started/ Next AWS events in France https://aws.amazon.com/fr/events/ •  AWSome Day in Lille 22/11 https://aws.amazon.com/fr/awsomeday/lille/ •  Security Week: 10 webinars (19-23/12) https://aws.amazon.com/fr/events/security-week/

Page 51: An Overview of AWS IoT (November 2016)

Thank You !Julien Simon

Principal Technical Evangelist Amazon Web Services

[email protected]

@julsimon


Recommended