CSE 521 S Course Projects AWS Io T

  • Slides: 31
Download presentation
CSE 521 S Course Projects AWS Io. T Tutorial TA for class CSE 521

CSE 521 S Course Projects AWS Io. T Tutorial TA for class CSE 521 S, Spring, Jan/19/2017 Haoran Li

Internet-of-Things Ø Things (Devices) q Many of them • Different Types • Isolated Systems

Internet-of-Things Ø Things (Devices) q Many of them • Different Types • Isolated Systems q Data and Command • Sensing the world • Give Response q Challenge • United: Connected + Communication • Smart: Data Analytics + Strategy 9/24/2020 Source: https: //aws. amazon. com/iot-platform/ http: //www. brain-smart. net/smart-brain-health-blog/page/2/#axzz 4 W 4 o. Sp 8 a 6 1

Solution: AWS Io. T United: Connect + Communication 9/24/2020 Smart: Other Cloud Service Data

Solution: AWS Io. T United: Connect + Communication 9/24/2020 Smart: Other Cloud Service Data Storage Machine Learning Source: https: //aws. amazon. com/iot-platform/ 2

Tutorial: Hello AWS Io. T! Random Integer [1, 100] LED >50 : ON <=50:

Tutorial: Hello AWS Io. T! Random Integer [1, 100] LED >50 : ON <=50: OFF Publish Forward Subscribe Amazon SNS 9/24/2020 Source: https: //aws. amazon. com/iot-platform/ 3

Step 1: Create a Virtual "Thing” AWS Io. T Virtual “Thing” / Shadow 9/24/2020

Step 1: Create a Virtual "Thing” AWS Io. T Virtual “Thing” / Shadow 9/24/2020 4

Get into AWS Manage Console Ø Create your own AWS account Ø Sign In

Get into AWS Manage Console Ø Create your own AWS account Ø Sign In Io. T Manage Console q 9/24/2020 https: //aws. amazon. com/iot/ 5

Create a thing Ø 1. AWS Io. T Menu q Registry • Things Create

Create a thing Ø 1. AWS Io. T Menu q Registry • Things Create Ø 2. Give a name 9/24/2020 6

Basic Interact: Publish Ø Using Embedded MQTT Client to Test Ø Check the Things

Basic Interact: Publish Ø Using Embedded MQTT Client to Test Ø Check the Things Shadow 9/24/2020 7

Basic Interact: Subscribe 9/24/2020 8

Basic Interact: Subscribe 9/24/2020 8

Step 2: Connect a Physical Device AWS Io. T MQTT Tools Certificate Virtual “Thing”

Step 2: Connect a Physical Device AWS Io. T MQTT Tools Certificate Virtual “Thing” / Shadow Copy 9/24/2020 Attach Policy 9

Create and get Certificates Ø Create Certificates q Security Certificates Create Ø Download Cert

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 9/24/2020 10

Create Policy and attach it to cert Ø Create Policy Ø Attach Policy to

Create Policy and attach it to cert Ø Create Policy Ø Attach Policy to Certificates 9/24/2020 11

Connect your Device Ø Copy certificates to RP 2 Ø Choose your AWS SDK

Connect your Device Ø Copy certificates to RP 2 Ø Choose your AWS SDK (support MQTT) Node JS q Python q Java q Embedded C q Ø You can also use third party MQTT tools q 9/24/2020 Python (paho mqtt library) 12

Some Notes Ø 1. You will need these certification when setting up the TLS

Some Notes Ø 1. You will need these certification when setting up the TLS 1. 2 verification Ø 2. You will need the endpoint and port (8883) when connect to AWS Io. T Gateway 9/24/2020 13

Publish / Subscribe Ø Publish Ø payload = "{"state": {"reported": {"rndnum": 50}}}" Ø Subscribe

Publish / Subscribe Ø Publish Ø payload = "{"state": {"reported": {"rndnum": 50}}}" Ø Subscribe 9/24/2020 14

Step 3: Push Button and Publish Random Integer [1, 100] Publish 9/24/2020 15

Step 3: Push Button and Publish Random Integer [1, 100] Publish 9/24/2020 15

Step 4: Subscribe and Lit up LED >50 : ON <=50: OFF AWS Io.

Step 4: Subscribe and Lit up LED >50 : ON <=50: OFF AWS Io. T Online MQTT Client Subscribe 9/24/2020 Virtual “Thing” / Shadow Publish 16

Step 5: Combine Them Together Random Integer [1, 100] LED >50 : ON <=50:

Step 5: Combine Them Together Random Integer [1, 100] LED >50 : ON <=50: OFF Publish Subscribe 9/24/2020 17

More Fancy: SNS services Ø Simple Notification Service AWS Io. T Publish Subscribe Virtual

More Fancy: SNS services Ø Simple Notification Service AWS Io. T Publish Subscribe Virtual “Thing” / Shadow Forward Subscribe 9/24/2020 My Topic Amazon SNS 18

Amazon SNS Ø Create a Topic ARN will be used later q Ø Subscribe

Amazon SNS Ø Create a Topic ARN will be used later q Ø Subscribe your cellphone and email to this topic 9/24/2020 19

Create a Rule in Amazon Io. T Ø Add a query to filter your

Create a Rule in Amazon Io. T Ø Add a query to filter your inteseting topic (event) Ø Add an Action: Forward this message to SNS q Specify Dest ARN q Enable Rule q 9/24/2020 20

Notification on SMS & Email 9/24/2020 21

Notification on SMS & Email 9/24/2020 21

Recap: Hello AWS Io. T! Random Integer [1, 100] LED >50 : ON <=50:

Recap: Hello AWS Io. T! Random Integer [1, 100] LED >50 : ON <=50: OFF Publish Forward Subscribe Amazon SNS 9/24/2020 Source: https: //aws. amazon. com/iot-platform/ 22

Recap: Amazon Io. T Architecture 9/24/2020 23

Recap: Amazon Io. T Architecture 9/24/2020 23

Be Creative! Ø Bunch of Services Ø Embedded systems + Cloud Services… Ø Io.

Be Creative! Ø Bunch of Services Ø Embedded systems + Cloud Services… Ø Io. T! 9/24/2020 24

One More Thing: Security Ø DON’T UPLOAD YOUR PUBLIC KEY!!! Time to Open Source!

One More Thing: Security Ø DON’T UPLOAD YOUR PUBLIC KEY!!! Time to Open Source! 9/24/2020 25 Source: We. Chat Subscriptions: 西乔《神秘的程序员们 39》 Geek Life Chpt 39.

What if… 50, 000 AWS Bill! 9/24/2020 26 Source: https: //www. quora. com/My-AWS-account-was-hacked-and-I-have-a-50 -000

What if… 50, 000 AWS Bill! 9/24/2020 26 Source: https: //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 Io. T q http: //docs. aws. amazon. com/iot/latest/developerguide/what -is-aws-iot. html Ø

Pointers Ø Amazon Io. T 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 Ø AWS Resource list for course projects q http: //cps. cse. wustl. edu/index. php/AWS_Resources Ø Apply for $40 credits for Amazon AWS q https: //aws. amazon. com/education/awseducate/apply/ 27

Project Requirements Ø Run in public cloud Ø Difficulty varies for listed candidates -

Project Requirements Ø Run in public cloud Ø Difficulty varies for listed candidates - will take difficulty into consideration when grading. Ø Will grade based on project difficulty q quality and depth of work q workload distribution among team members q Ø Milestones: proposal, demo 1, demo 2, final demo, report. Ø Start early! Discuss with us and Dr. Lu 28

Example: Smart House Keeper Temperature/Humidity Sensor Camera System Real. Time Monitor LED 29

Example: Smart House Keeper Temperature/Humidity Sensor Camera System Real. Time Monitor LED 29

Final Project Integrated everything with webpage dashboard • Real. Time Live Stream • Real.

Final Project Integrated everything with webpage dashboard • Real. Time Live Stream • Real. Time Temperature and Humidity Monitor • Remotely Light Control • Virtual Control Over Door • Android App: Live Streaming and Light Control