Professional Documents
Culture Documents
Haoran Li
TA for class CSE 521S, Spring
1/19/2017
Internet-of-Things
Things (Devices)
q Many of them
Different Types
Isolated Systems
q Challenge
United: Connected + Communication
Smart: Data Analytics + Strategy
Random
>50 : ON
Integer LED
<=50: OFF
[1, 100]
Publish Forward
Subscribe
Amazon SNS
AWS IoT
Virtual
Thing /
Shadow
1/19/17 5
Get into AWS Manage Console
Create your own AWS account
Sign In IoT Manage Console
q https://aws.amazon.com/iot/
1/19/17 6
Create a thing
1. AWS IoT Menu
q Registry
Things Create
2. Give a name
1/19/17 7
Basic Interact: Publish
Using Embedded MQTT Client to Test
1/19/17 8
Basic Interact: Subscribe
1/19/17 9
Step 2: Connect a Physical Device
AWS IoT
MQTT Tools
CerIcate
Virtual A.ach
Thing /
Shadow
Copy Policy
1/19/17 10
Create and get Certificates
Create Certificates
q Security Certificates Create
Download Cert Files
1. public & private key
2. thing cert
3. Root CA for AWS
1/19/17 11
Create Policy and attach it to cert
Create Policy
1/19/17 12
Connect your Device
Copy certificates to RP2
1/19/17 13
Some Notes
1.You will need these certification when setting up the TLS1.2
verification
2.You will need the endpoint and port (8883) when connect
to AWS IoT Gateway
1/19/17 14
Publish / Subscribe
Publish
payload = "{\"state\":{\"reported\":{\"rndnum\":50}}}"
Subscribe
1/19/17 15
Step 3: Push Button and Publish
Random
Integer
[1, 100]
Publish
1/19/17 16
Step 4: Subscribe and Lit up LED
>50 : ON
LED
<=50: OFF
AWS IoT
Online MQTT
Client
Virtual
Thing / Publish
Subscribe
Shadow
1/19/17 17
Step 5: Combine Them Together
Random
>50 : ON
Integer LED
<=50: OFF
[1, 100]
Publish
Subscribe
1/19/17 18
More Fancy: SNS services
Simple Notification Service
AWS IoT
Publish
Virtual
Thing /
Subscribe Shadow
Forward
Subscribe
My Topic
1/19/17 20
Create a Rule in Amazon IoT
Add a query to filter your inteseting topic (event)
Add an Action:
q Forward this message to SNS
q Specify Dest ARN
q Enable Rule
1/19/17 21
Notification on SMS & Email
1/19/17 22
Recap: Hello AWS IoT!
Random
>50 : ON
Integer LED
<=50: OFF
[1, 100]
Publish Forward
Subscribe
Amazon SNS
1/19/17 24
Be Creative!
Bunch of Services
Embedded
systems + Cloud
Services
IoT!
1/19/17 25
One More Thing: Security
DONT UPLOAD YOUR PUBLIC KEY!!!
1/19/17
Source: WeChat SubscripIons: 39 Geek Life Chpt 39.
26
What if 50,000 AWS Bill!
1/19/17 27
Source: h.ps://www.quora.com/My-AWS-account-was-hacked-and-I-have-a-50-000-bill-how-can-I-reduce-the-amount-I-need-to-pay
Pointers
Amazon IoT
q http://docs.aws.amazon.com/iot/latest/developerguide/what-is-
aws-iot.html
Amazon SNS
q http://docs.aws.amazon.com/sns/latest/dg/welcome.html
1/19/17 28
Project Requirements
Run in public cloud
1/19/17 29