![Page 1: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/1.jpg)
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Michael Garcia, Sr. Technical Program Manager AWS IoT
September 29, 2016
AWS IoTGetting Started
@michaelgarcia__
![Page 2: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/2.jpg)
Today’s webinar
Hands-On
AWS IoT
Get started !
AWS IoT Starter Kit
![Page 3: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/3.jpg)
![Page 4: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/4.jpg)
Challenges
Many SDKs &
Tools
Scalability Security &
Management
Cloud Powered
Apps
Big Data & Analytics &
predictions
![Page 5: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/5.jpg)
AWS IoT
DEVICE SDKSet of client libraries to
connect, authenticate and
exchange messages
DEVICE GATEWAYCommunicate with devices via
MQTT
AUTHENTICATION
AUTHORIZATIONSecure with mutual
authentication and encryption
RULES ENGINETransform messages
based on rules and
route to AWS Services
AWS Services
- - - - -
3P Services
DEVICE SHADOWPersistent thing state
during intermittent
connections
APPLICATIONS
AWS IoT API
HTTP
DEVICE REGISTRYIdentity and Management of
your things
![Page 6: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/6.jpg)
AWS IoT
DEVICE SDKSet of client libraries to
connect, authenticate and
exchange messages
![Page 7: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/7.jpg)
AWS IoT Device SDKs
Arduino Yún
Arduino
Mobile SDKs
Android and iOS
C-SDK
RTOS, μControllers
JS-SDK
Embedded Platforms
Java
Embedded Platforms
Python
Embedded Platforms
https://aws.amazon.com/iot/sdk/
![Page 8: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/8.jpg)
Security and Identity
AUTHENTICATIONSecure with mutual
authentication and encryption
![Page 9: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/9.jpg)
Security and Identity
TLS Mutual Authentication
Fine-Grained Permissions through Policies
Standard Web Security
![Page 10: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/10.jpg)
Mutual Auth TLSwww.mywebsite.com
- Secure Pipe
- Anonymous
- Secure Bi-Directional Pipe
- Mutual Proof of Identity
![Page 11: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/11.jpg)
AWS IoT Authentication & Authorization
![Page 12: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/12.jpg)
Device Gateway
![Page 13: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/13.jpg)
AWS IoT Message Broker
![Page 14: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/14.jpg)
MQTT
MQTT vs HTTPS:
• 93x faster throughput
• 11.89x less battery to send
• 170.9x less battery to receive
• 50% less power to keep connected
• 8x less network overhead
Source:
http://stephendnicholas.com/archives/1217
• OASIS standard protocol (v3.1.1)
• Lightweight, pub-sub, transport protocol
that is useful for connected devices
• MQTT is used on oil rigs, connected
trucks, and many more sensitive and
resource-sensitive scenarios
• Customers have needed to build,
maintain, and scale a broker to use
MQTT with cloud applications
![Page 15: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/15.jpg)
MQTT
Publishers SubscribersTOPIC
‘mytopic’
Publish to ‘mytopic’ Subscribe to ‘mytopic’
![Page 16: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/16.jpg)
MQTT
Publishers SubscribersTOPIC
‘mytopic’
![Page 17: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/17.jpg)
MQTT
Publishers SubscribersTOPIC
‘mytopic1’
‘mytopic2’
‘mytopic3’
![Page 18: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/18.jpg)
AWS IoT Message Broker : managed service
Highly Scalable
Device Gateway
Millions of devices
sending billions of
messages
SubscribersPublishers
![Page 19: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/19.jpg)
Device Registry
THING REGISTRYIdentity and Management of
your things
![Page 20: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/20.jpg)
Device Registry
$ aws --region us-east-1 iot describe-thing --thing-name pump1
{
"attributes": {
"MN": "AB776",
"install_date": "12-23-2011",
"SN": "225458854"
},
"thingName": "pump1",
"defaultClientId": "pump1"
}
![Page 21: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/21.jpg)
Device Shadows
THING SHADOWPersistent thing state
during intermittent
connections
![Page 22: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/22.jpg)
AWS IoT Device Shadows
![Page 23: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/23.jpg)
Device Shadows
{
"state" : {
“desired" : {
"lights": { "color": "RED" },
"engine" : "ON"
},
"reported" : {
"lights" : { "color": "GREEN" },
"engine" : "ON"
},
"delta" : {
"lights" : { "color": "RED" }
} },
"version" : 10
}
Thing
Report its current state to one or multiple shadow
Retrieve its desired state from shadow
Mobile App
Set the desired state of a device
Get the last reported state of the device
Delete the shadow
Shadow
Shadow reports delta, desired
and reported states along with metadata and version
![Page 24: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/24.jpg)
Device Shadows{
"state" : {
“desired" : {
"engine" : "ON”,
“tires”: {
“LF”:40,
“RF”:38,
“LR”:37,
“RR”:39
},
“CCD”: {
“A”:0,
“B”:8,
“C”:7,
“D”:9
}
},
"reported" : {
"engine" : ”OFF”,
“tires”: {
“LF”:40,
“RF”:38,
“LR”:37,
“RR”:39
},
“CCD”: {
“A”:0,
“B”:8,
“C”:7,
“D”:9
}
},
"version" : 10
}
![Page 25: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/25.jpg)
Device Shadows{
"state" : {
“desired" : {
"engine" : ”OFF”,
“tires”: {
“LF”:40,
“RF”:38,
“LR”:37,
“RR”:39
},
“CCD”: {
“A”:0,
“B”:8,
“C”:7,
“D”:9
}
},
"reported" : {
"engine" : ”OFF”,
“tires”: {
“LF”:40,
“RF”:38,
“LR”:37,
“RR”:39
},
“CCD”: {
“A”:0,
“B”:8,
“C”:7,
“D”:9
}
},
"delta" : {
”engine" : “ON”
} },
"version" : 10
}
"engine" : ”OFF”
![Page 26: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/26.jpg)
Device Shadows{
"state" : {
“desired" : {
"engine" : "ON”,
“tires”: {
“LF”:40,
“RF”:38,
“LR”:37,
“RR”:39
},
“CCD”: {
“A”:0,
“B”:8,
“C”:7,
“D”:9
}
},
"reported" : {
"engine" : ”OFF”,
“tires”: {
“LF”:40,
“RF”:38,
“LR”:37,
“RR”:39
},
“CCD”: {
“A”:0,
“B”:8,
“C”:7,
“D”:9
}
},
"delta" : {
”engine" : “ON”
} },
"version" : 10
}
"engine" : ”ON”
![Page 27: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/27.jpg)
Device Shadows{
"state" : {
“desired" : {
"engine" : "ON”,
“tires”: {
“LF”:40,
“RF”:38,
“LR”:37,
“RR”:39
},
“CCD”: {
“A”:0,
“B”:8,
“C”:7,
“D”:9
}
},
"reported" : {
"engine" : ”OFF”,
“tires”: {
“LF”:40,
“RF”:38,
“LR”:37,
“RR”:39
},
“CCD”: {
“A”:0,
“B”:8,
“C”:7,
“D”:9
}
},
"delta" : {
”engine" : “ON”
} },
"version" : 10
}
"engine" : "ON”
![Page 28: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/28.jpg)
Device Shadows{
"state" : {
“desired" : {
"engine" : "ON”,
“tires”: {
“LF”:40,
“RF”:38,
“LR”:37,
“RR”:39
},
“CCD”: {
“A”:0,
“B”:8,
“C”:7,
“D”:9
}
},
"reported" : {
"engine" : ”ON”,
“tires”: {
“LF”:40,
“RF”:38,
“LR”:37,
“RR”:39
},
“CCD”: {
“A”:0,
“B”:8,
“C”:7,
“D”:9
}
},
"version" : 10
}
"engine" : "ON”
![Page 29: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/29.jpg)
AWS IoT Rules Engine actions
RULES ENGINETransform messages
based on rules and
route to AWS Services
AWS Services
- - - - -
3P Services
AWS Services
- - - - -
3P Services
![Page 30: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/30.jpg)
AWS IoT Rules Engine
![Page 31: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/31.jpg)
Rules Engine
building1/chillers/xx881
building1/fans/aj982
building3/chillers/ks434
building1/radiators/ss243
building2/chillers/fe324
"sql": "SELECT * FROM 'building1/#'"
"actions": [{ "dynamoDB":….
![Page 32: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/32.jpg)
Rules Engine
building1/chillers/xx881
building1/fans/aj982
building3/chillers/ks434
building1/radiators/ss243
building2/chillers/fe324
"sql": "SELECT * FROM 'building1/#'"
"actions": [{ "dynamoDB":….
![Page 33: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/33.jpg)
AWS IoT Rules Engine
SELECT DATA FROM TOPIC WHERE FILTER
THEN ACTION
![Page 34: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/34.jpg)
AWS IoT – SQL Reference
SELECT DATA FROM…
• SELECT *
• SELECT deviceid, temp
• SELECT coords.latitude
• SELECT a.another_level.b
• Returns {“b” : 3}
• SELECT a..b
• Returns {“b” : 3}
{
“deviceid” : “iot123”,
“temp” : 54,
“humidity” : 32,
“coords” : {
“latitude” : 47.615694,
“longitude” : -122.3359976
},
“a” : {
“another_level” : {
{“b” : 3},
{“b” : 5}
}}
}
SAMPLE PAYLOAD
![Page 35: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/35.jpg)
AWS IoT – SQL Reference
SELECT DATA FROM…
• SELECT deviceid AS client
• SELECT md5(deviceid) AS hashed_id
Substitution Templates
• ${expression}
• ${topic() - md5(deviceid)}
• ${deviceid - temp}
{
“deviceid” : “iot123”,
“temp” : 54,
“humidity” : 32,
“coords” : {
“latitude” : 47.615694,
“longitude” : -122.3359976
},
“a” : {
“another_level” : {
{“b” : 3},
{“b” : 5}
}}
}
SAMPLE PAYLOAD
![Page 36: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/36.jpg)
AWS IoT – SQL Reference
SELECT DATA FROM TOPIC WHERE FILTER
• Like scanning a database table
• Default source is an MQTT topic
EXAMPLES:
• FROM mqtt(‘my/topic’)
• FROM mqtt(‘my/wildcard/+/topic’)
• FROM (‘my/topic’)
![Page 37: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/37.jpg)
AWS IoT – SQL Reference
SELECT DATA FROM TOPIC WHERE FILTER
Token Meaning Example
= Equal, comparison color = 'red'
<> Not Equal, comparison color <> 'red'
AND Logical AND color = 'red' AND siren = 'on'
OR Logical OR color = 'red' OR siren = 'on'
() Parenthesis, grouping color = 'red' AND (siren = 'on' OR isTest)
+ Addition, arithmetic 5 + 3
- Substitution, arithmetic 5 - 4
/ Division, arithmetic 8 / 2
![Page 38: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/38.jpg)
AWS IoT – SQL Reference
SELECT DATA FROM TOPIC WHERE FILTER
THEN ACTION
LambdaSNS SQS
S3 Amazon KinesisDDB RDS
Amazon
Redshift
Amazon Glacier
EC2
3rd party
![Page 39: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/39.jpg)
AWS IoT Starter Kit
![Page 41: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/41.jpg)
AWS IoT Starter Kits
![Page 42: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/42.jpg)
Hands-On
![Page 43: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/43.jpg)
Hands-On !
![Page 44: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/44.jpg)
Get started !
![Page 45: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/45.jpg)
Pricing
• Pay as you go. No minimum fees.
• $5 per million messages published to, or delivered
by, AWS IoT.
• Free Tier: 250,000 messages per month for 12
months.
AWS IoT
https://aws.amazon.com/
![Page 46: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/46.jpg)
Re:Invent 2015 Mobile & IoT
Source:
https://www.youtube.com/playlist?list=PLhr1KZpdzukcBfuUdMOKc94mnrQhBpdmw
![Page 47: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/47.jpg)
Resources
http://aws.amazon.com/iot/developer-resources/
http://aws.amazon.com/iot/getting-started/
![Page 48: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/48.jpg)
Monday, October 24, 2016
JW Marriot Austin
https://aws.amazon.com/events/devday-
austin
Free, one-day developer event featuring tracks, labs,
and workshops around Serverless, Containers, IoT,
and Mobile
![Page 49: Getting Started with AWS IoT - September 2016 Webinar Series](https://reader033.vdocument.in/reader033/viewer/2022052117/5a6554d97f8b9aff1a8b4a2b/html5/thumbnails/49.jpg)
Thank you!