cloud tutorial: aws iot - washington university in st. louislu/cse521s/slides/aws-iot.pdf · cloud...
Post on 26-Mar-2018
220 Views
Preview:
TRANSCRIPT
CloudTutorial:AWSIoT
TAforclassCSE521S,Fall,Jan/18/2018HaoranLi
Pointers
Ø Amazon IoTq http://docs.aws.amazon.com/iot/latest/developerguide/what-is-
aws-iot.html
Ø Amazon EC2q http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/
EC2_GetStarted.html
Ø Resource list for course projectsq http://cps.cse.wustl.edu/index.php/List_of_Projects
Ø Apply for $40 credits for Amazon AWS q https://aws.amazon.com/education/awseducate/apply/
2
XaaS:BasicsinCloudComputing
CloudComputing
1/18/18 4
Ø Cloud computing provides shared pool of configurable computing resource to end users on demand
Ø Three service modelsq IaaS (Infrastructure as a Service): virtual machines, storage,
network …q PaaS (Platform as a Service): execution runtime, middleware,
web server, database, development tool …q SaaS (Software as a Service): email, virtual desktop, games …
CloudServices:On-premiseSoftware
Ø Traditional
Ø installed and runs on personal computer
Ø You Manage and Deployq Hardwareq OSq Software
Ø Exampleq This presentation
1/18/18 5
APP
Data
Runtime
Middleware
OS
Virtualization
Server
Storage
Network
YouManage
InfrastructureasaService(IaaS)Ø IaaS
q "physical server box”q Virtual Machine
• Memory• Storage• CPU• Network
Ø Exampleq AWS EC2q AWS HPC
Ø Usecaseq Build up you VM cluster
1/18/18 6
YouManage
APP
Data
Runtime
Middleware
OS
Virtualization
Server
Storage
Network
ServiceProviderManages
WebService
PlatformasaService(PaaS)
Ø PaaSq You get a framework
q Host Application
q Tools
Ø Exampleq AWS IoT
Ø Usecaseq Build up you’re smart A/C
controller
1/18/18 7
YouManage
ServiceProviderManages
APP
Data
Runtime
Middleware
OS
Virtualization
Server
Storage
Network
PaaSExample:AmazonIoT
1/18/18 8
Tools
Framework
SoftwareasaService(SaaS)
Ø SaaSq You get a whole solution
Ø Exampleq Gmailq Dropbox
q Office365
1/18/18 9
ServiceProviderManages
APP
Data
Runtime
Middleware
OS
Virtualization
Server
Storage
Network
XaaS:ARecap
1/18/18 10
APP
Data
Runtime
Middleware
OS
Virtualization
Server
Storage
Network
YouManage
YouManage
APP
Data
Runtime
Middleware
OS
Virtualization
Server
Storage
Network
ServiceProviderManages
YouManage
ServiceProviderManages
APP
Data
Runtime
Middleware
OS
Virtualization
Server
Storage
Network
ServiceProviderManages
APP
Data
Runtime
Middleware
OS
Virtualization
Server
Storage
Network
On-Premise IaaS PaaS SaaS
Tutorial:Hello!AWSIoT!!
Internet-of-Things
1/18/18 12
Ø 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
Source:https://aws.amazon.com/iot-platform/http://www.brain-smart.net/smart-brain-health-blog/page/2/#axzz4W4oSp8a6
Solution:AWSIoT
1/18/18 13
United:Connect+Communication Smart:OtherCloudServiceDataStorageMachineLearning
Source:https://aws.amazon.com/iot-platform/
Stated:“ThingShadow”
Tutorial:HelloAWSIoT!
1/18/18 14Source:https://aws.amazon.com/iot-platform/
RandomInteger[1,100]
Publish
AmazonSNS
Forward
AWSEC2t2.micro
Subscribe
Step1:CreateaVirtual"Thing”
1/18/18 15
AWSIoT
Virtual“Thing”/Shadow
GetintoAWSManageConsole
Ø Create your own AWS accountØ Sign In IoT Manage Console
q https://aws.amazon.com/iot/
1/18/18 16
Createathing
Ø 1. AWS IoT Menuq Registry
• Things è Create
Ø 2. Give a name
1/18/18 17
BasicInteract:Publish
Ø Using Embedded MQTT Client to Test
Ø Check the Things Shadow
1/18/18 18
BasicInteract:Subscribe
1/18/18 19
AWSEC2t2.micro
Step2:Connecta“Physical”Device
1/18/18 20
AWSIoT
Virtual“Thing”/Shadow
Attach
Certificate
Policy Copy
MQTTClient
RandomInteger[1,100]
CreateandgetCertificates
Ø Create Certificatesq Security è Certificates è Create
Ø Download Cert Files• 1. public & private key• 2. thing cert
• 3. Root CA for AWS
1/18/18 21
CreatePolicyandattachittocert
Ø Create Policy
Ø Attach Policy to Certificates
1/18/18 22
Setyourpolicytoallowpub/sub!
ConnectyourDevice
Ø Copy certificates to your EC2 Instanceq Note: through scp utility
Ø Choose your AWS SDK (support MQTT)q Node JS
q Pythonq Java
Ø You can also use third party MQTT toolsq Python (paho-mqtt library)
1/18/18 23
SomeNotes
Ø 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/18/18 24
More:RuleEngine,LinkwithSNSservices
Ø Simple Notification Service
1/18/18 25
Publish
AmazonSNS
AWSIoT
Virtual“Thing”/Shadow
Forward
Topic:CSE521_Tutorial
Subscribe
Subscribe
AWSEC2t2.micro
AmazonSNS
Ø Create a Topicq ARN will be used
later
Ø Subscribe your cellphone and email to this topic
1/18/18 26
CreateaRuleinAmazonIoT
Ø Add a query to filter your inteseting topic (event)
Ø Add an Action:q Forward this message to SNSq Specify Dest ARN
q Enable Rule
1/18/18 27
NotificationonSMS&Email
1/18/18 28
OneMoreThing:AccountSecurity
Ø DON’T UPLOAD YOUR KEY PUBLICLY!!!
1/18/18 29
TimetoOpenSource!
Source:WeChatSubscriptions: 西乔《神秘的程序员们 39》GeekLifeChpt39.
Whatif…$50,000AWSBill!
1/18/18 30Source: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 EC2q http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/
EC2_GetStarted.html
Ø Amazon IoTq http://docs.aws.amazon.com/iot/latest/developerguide/what-is-
aws-iot.html
Ø Resource list for course projectsq http://cps.cse.wustl.edu/index.php/List_of_Projects
Ø Apply for $40 credits for Amazon AWS q https://aws.amazon.com/education/awseducate/apply/
31
Thanks!
HaoranLi
Jan/18/2018
top related