Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
建構可彈性擴展規模、無伺服器的
行動裝置與物聯網應用後端環境
John	
  Chang 張書源
Ecosystem	
  Solutions	
  Architect
johnchan@amazon.com
What  to  Expect  from  the  Session
Demonstration
Mobile  and  IoT  Usage  Scenarios
AWS  IoT  SDKs  and  API
Architectur...
AWS 邁向創新
新服務發佈與更新數目
2009
48
280
722
82
2011 2013 2015
AWS  IoT
DEVICE  SDK
Set  of  client  libraries  to  
connect,  authenticate  and  
exchange  messages
DEVICE  GATEWAY
Com...
AWS  Platform  For  IoT
App
Backend
API  
Gateway
Lambda
Edge  Service
CloudFront
Companion
Apps
Analytics
RedShift
Data
S...
The  Power  Of  Speech:    Alexa
Alexa  Voice
Services
Amazon
Echo
Alexa
Skills  KitIoT Apps,  Back  
End  System,   Big  ...
Demonstration
Dashboard
Intel Edison
Serverless
Web Dashboard
Amazon  Cognito
Amazon
DynamoDB
Rule
The  rule  pushes  ALL  data  to  an ...
Dashboard
Amazon  Cognito
Amazon
DynamoDB
User
SmatphoneUser
Serverless
Web Dashboard
Amazon  S3
SDK JavaScript
SDK Android
AWS  IoT  Thing  Shadow:  Desired  state
Intel Edison
Desired
state
Shadow
Desired state
Shadow
Ask  for  desired  state  ...
AWS  IoT  Thing  Shadow:  Desired  state
Shadow
{
"state":{
"desired":{
”pump":”1"
}
}
}
POST  /things/Edison/state
AWS  IoT  Thing  Shadow:  Desired  state
Shadow
{
"state":{
”pump":”1"
},
"version":"3",
"metadata":{
"color":<time-­stamp...
AWS  IoT  Thing  Shadow:  Reported  state
Intel Edison
Shadow
Reported
state
Rule
Amazon SNS
Mobile push
Send  SNS  Mobile...
AWS  IoT  Thing  Shadow:  Reported  state
Shadow
{
"state":{
”reported":{
”pump":”1"
}
}
}
MQTT          $aws/things/Ediso...
AWS  IoT  Thing  Shadow:  Reported  state
Rule
{
"sql":  "SELECT * FROM '$aws/things/Edison/shadow/update/delta'
WHERE sta...
Server-­less  
Intel Edison
Rule
AWS Lambda
Triggers  Lambda  function  when  humidity  is  too  low
Rule
Mobile
Applicati...
Server-­less
Rule
{
"sql":  "SELECT  *  FROM  'things/data' WHERE  humidity  <  20",
"ruleDisabled":  false,
"actions":  [...
AWS  IoT  Button  -­ “Hello  World”  of  AWS  IoT
• Based  on  the  Amazon  dash  button  
hardware  (Stateless  Wi-­Fi  B...
AWS  IoT  to  AWS  Lambda  to  and  External  Endpoint
Lambda  Function
Rules  Engine
PolicyPrivate  Key
&  Certificate
Th...
AWS  IoT  to  Amazon  DynamoDB  to  Dashboard
DynamoDB  Table
Rules  Engine
PolicyPrivate  Key
&  Certificate
Thing/Device...
AWS  IoT  SDKs  and  APIs
Get  Started  with  AWS  IoT  Device  SDK
C-­SDK
(Ideal  for  embedded  
OS)
JS-­SDK  
(Ideal  for  Embedded  
Linux  Plat...
AWS  IoT  CLI  and  Web  Console
Additional  Access  to  AWS  IoT  available:
• AWS  CLI
• AWS  IoT  Web  Console
AWS CLI ...
Common  Design  Architectures  
with  AWS  IoT
Building  Automation  /  Mobile  Control  of  IoT
• Dynamic  Automation:  Dynamically  respond  to  Events  happening  
in...
Display  complex  metrics…
…  Using  processing  power  from  the  AWS  Cloud
AWS IoTConnected
device
AWS Lambda
Amazon
Dy...
Learn  your  user  preferences…
…  And  anticipate  their  needs
Serverless
Web Dashboard
Millions  of  sources  
producin...
Amazon AWS IoT 利用 AWS IoT 開發智慧家居解決方案
Amazon AWS IoT 利用 AWS IoT 開發智慧家居解決方案
Amazon AWS IoT 利用 AWS IoT 開發智慧家居解決方案
Amazon AWS IoT 利用 AWS IoT 開發智慧家居解決方案
Upcoming SlideShare
Loading in …5
×

Amazon AWS IoT 利用 AWS IoT 開發智慧家居解決方案

2,572 views

Published on

Amazon AWS IoT 利用 AWS IoT 開發智慧家居解決方案

2016/05/29@台北職能發展學院

Published in: Software
  • Be the first to comment

Amazon AWS IoT 利用 AWS IoT 開發智慧家居解決方案

  1. 1. 建構可彈性擴展規模、無伺服器的 行動裝置與物聯網應用後端環境 John  Chang 張書源 Ecosystem  Solutions  Architect johnchan@amazon.com
  2. 2. What  to  Expect  from  the  Session Demonstration Mobile  and  IoT  Usage  Scenarios AWS  IoT  SDKs  and  API Architecture  with  AWS  IoT
  3. 3. AWS 邁向創新 新服務發佈與更新數目 2009 48 280 722 82 2011 2013 2015
  4. 4. AWS  IoT 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  Services -­ -­ -­ -­ -­ 3P  Services DEVICE  SHADOW Persistent  thing  state   during  intermittent   connections APPLICATIONS AWS  IoT  API DEVICE  REGISTRY Identity  and  Management  of   your  things
  5. 5. AWS  Platform  For  IoT App Backend API   Gateway Lambda Edge  Service CloudFront Companion Apps Analytics RedShift Data Storage S3 SDKs C,  iOS Android Machine Learning Machine   Learning DynamoDB AWS  Global  Infrastructure APN  Partner  Solutions Kinesis Ingestion,   Protocols  &   Security Device   Shadows Mobile  Hub EMR Reference   Hardware Rules Engine AWS  IoT
  6. 6. The  Power  Of  Speech:    Alexa Alexa  Voice Services Amazon Echo Alexa Skills  KitIoT Apps,  Back   End  System,   Big   Data,  Machine   Learning,  Storage Companion   Apps Lambda AWS  IoT Voice   Control • Alexa -­ With  the  Alexa  Skills  Kit,   you  can  easily  build  and  add  your   own  skills  to  Alexa. • AWS  IoT manages  the  connection   devices  and  integration  with  ASK,   as  well  as  other  backend  systems   and  companion  apps. • Build  skills  for  Alexa  using AWS   Lambda.  Simply  write  the  code   using and  upload  it  as  a  Lambda   function. • Alexa  Voice  Service  brings  voice-­ powered  experiences  to  any   connected  devices. Device  Connection
  7. 7. Demonstration
  8. 8. Dashboard Intel Edison Serverless Web Dashboard Amazon  Cognito Amazon DynamoDB Rule The  rule  pushes  ALL  data  to  an  Amazon  DynamoDB  table Rule User Mobile Application User AWS IoT
  9. 9. Dashboard Amazon  Cognito Amazon DynamoDB User SmatphoneUser Serverless Web Dashboard Amazon  S3 SDK JavaScript SDK Android
  10. 10. AWS  IoT  Thing  Shadow:  Desired  state Intel Edison Desired state Shadow Desired state Shadow Ask  for  desired  state  to  activate  the  pump Mobile Application User AWS IoT HTTPSMQTTS
  11. 11. AWS  IoT  Thing  Shadow:  Desired  state Shadow { "state":{ "desired":{ ”pump":”1" } } } POST  /things/Edison/state
  12. 12. AWS  IoT  Thing  Shadow:  Desired  state Shadow { "state":{ ”pump":”1" }, "version":"3", "metadata":{ "color":<time-­stamp> } } MQTT          $aws/things/Edison/shadow/update
  13. 13. AWS  IoT  Thing  Shadow:  Reported  state Intel Edison Shadow Reported state Rule Amazon SNS Mobile push Send  SNS  Mobile  Push  Notification  when  pump  has  been  activated Rule ”reported":  {  "pump":  1 } Shadow Mobile Application User AWS IoT
  14. 14. AWS  IoT  Thing  Shadow:  Reported  state Shadow { "state":{ ”reported":{ ”pump":”1" } } } MQTT          $aws/things/Edison/shadow/update
  15. 15. AWS  IoT  Thing  Shadow:  Reported  state Rule { "sql":  "SELECT * FROM '$aws/things/Edison/shadow/update/delta' WHERE state.desired.pump  =  1 AND state.reported.pump  =  1", "ruleDisabled":  false, "actions":  [ { "sns":  { "roleArn":  "arn:aws:iam::xxxxxxxxxxx:role/iot-­role", ”targetArn":  "arn:aws:sns:us-­east-­1:xxxxxxxxxxx:ReInventDemo" } } ] }
  16. 16. Server-­less   Intel Edison Rule AWS Lambda Triggers  Lambda  function  when  humidity  is  too  low Rule Mobile Application User AWS IoT
  17. 17. Server-­less Rule { "sql":  "SELECT  *  FROM  'things/data' WHERE  humidity  <  20", "ruleDisabled":  false, "actions":  [ { "lambda":  { "functionArn":  "arn:aws:lambda:us-­east-­ 1:xxxxxxxxxxx:function:pumpAlert" } } ] }
  18. 18. AWS  IoT  Button  -­ “Hello  World”  of  AWS  IoT • Based  on  the  Amazon  dash  button   hardware  (Stateless  Wi-­Fi  Button) • Code  in  the  Cloud;;  no  device   specific  code  or  flashing  required • Learn  Rules,  Shadows  and  Topics Build  Cool  Stuff
  19. 19. AWS  IoT  to  AWS  Lambda  to  and  External  Endpoint Lambda  Function Rules  Engine PolicyPrivate  Key &  Certificate Thing/Device Rule SDK AWS  IoT AWS  Services Execution Role Policy External  Endpoint Permission Select  *  from  ‘iotbutton/+’ Action Intel Edison
  20. 20. AWS  IoT  to  Amazon  DynamoDB  to  Dashboard DynamoDB  Table Rules  Engine PolicyPrivate  Key &  Certificate Thing/Device Rule SDK AWS  IoT AWS  Services Policy Dashboard IAM   Role Select  *  from  ‘iotbutton/+’ Action DynamoDB S3  Website Intel Edison
  21. 21. AWS  IoT  SDKs  and  APIs
  22. 22. Get  Started  with  AWS  IoT  Device  SDK C-­SDK (Ideal  for  embedded   OS) JS-­SDK   (Ideal  for  Embedded   Linux  Platforms) Arduino  Library (Arduino  Yun) Mobile  SDK (Android  and  iOS)
  23. 23. AWS  IoT  CLI  and  Web  Console Additional  Access  to  AWS  IoT  available: • AWS  CLI • AWS  IoT  Web  Console AWS CLI AWS Management Console
  24. 24. Common  Design  Architectures   with  AWS  IoT
  25. 25. Building  Automation  /  Mobile  Control  of  IoT • Dynamic  Automation:  Dynamically  respond  to  Events  happening   in  the  Factory ex.  Opening  doors  and  requesting  assistance  when  emergency  button  is  pushed • Mobile  Control:  Simplify  mobile  control  of  IoT/Factory  automation   devices  with  AWS  IoT  rules IoT Devices AWS cloudAWS Lambda AWS IoT  Rule Mobile Application Factory
  26. 26. Display  complex  metrics… …  Using  processing  power  from  the  AWS  Cloud AWS IoTConnected device AWS Lambda Amazon DynamoDB Mobile Application User
  27. 27. Learn  your  user  preferences… …  And  anticipate  their  needs Serverless Web Dashboard Millions  of  sources   producing   terabytes  of  data IoT Devices Mobile Application AWS IoT Amazon Kinesis Amazon Machine Learning Amazon S3

×