leeds iot meetup - nov 2017
TRANSCRIPT
![Page 1: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/1.jpg)
© 2017, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
20 November 2017
Building the IoT with the AWS Cloud
Ian Massingham @IanMmmm Technology Evangelist, AWS
![Page 2: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/2.jpg)
IoT Applications : An Early Use Case for AWS
![Page 3: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/3.jpg)
Today, The Most Successful IoT Deployments Run On AWS
![Page 4: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/4.jpg)
Remove Constraints & Build the IoT with AWS
![Page 5: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/5.jpg)
Minimising Heavy Lifting with AWS IoT
10
10
Devices Network Security Data SmartsConnect at Any Scale
Lightweight Protocol
X509 Certificates &
TLS Encryption
DynamoDB, Kinesis, S3 and more
Trigger AWS Lambda
Functions
![Page 6: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/6.jpg)
The AWS IoT Platform
Your AppThings
AWS IoTDevice
GatewayRules
Registry
Shadow
S3 DynamoDB Kinesis Lambda….
![Page 7: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/7.jpg)
AWS IoT
![Page 8: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/8.jpg)
What Constitutes On-Premises Infrastructure?
Sensors & IoT DevicesData CentreInfrastructure
![Page 9: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/9.jpg)
Challenges Of Devices Living On The Edge
Round-trip latency
Intermittent connectivity
Expensive bandwidth
Programming and updating embedded software needs specialized skills
Limited to what is on the device unless you rewrite or program the device
![Page 10: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/10.jpg)
AWS GreengrassEmbed Lambda Compute (& Other AWS Services) in Connected Devices
Available Now
Use The Same AWS Programming Model In Devices And The Cloud
![Page 11: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/11.jpg)
AWS Greengrass: Local Compute, Messaging & Data Caching
Local compute
Local data caching
Securecommunications
Local messaging
![Page 12: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/12.jpg)
AWS Greengrass: How It Works
Built intodevices at
manufacture
Install the Greengrass
runtime
Lambda functionson AWS & devices
Manage fromAWS Console
Same programmingmodel
Localcommunication
and orchestration
![Page 13: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/13.jpg)
Amazon Greengrass: Example Use Cases
Smart Homes Agriculture Manufacturing
![Page 14: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/14.jpg)
Building ‘Hello World’ (for IoT Developers)
![Page 15: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/15.jpg)
![Page 16: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/16.jpg)
Turns out, developers are creative
![Page 17: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/17.jpg)
Sassy Ping PongScore Keeper
Source: https://www.hackster.io/youngd/ping-pong-showdown-eabaed
![Page 18: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/18.jpg)
Slack-powered Doorbell
Source: www.theatlantic.com/notes/2016/07/make-every-week-2-a-silent-slack-powered-doorbell/490880/
![Page 19: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/19.jpg)
Source: http://www.andrewmcgill.me/2016/08/19/make-every-week-sweetgreen-salad-button.html
EmergencySweet Green Ordering
![Page 20: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/20.jpg)
Push a button to get directions to the right meal within your budget. (Integrate time of day, weather, Google Directions, Yelp, and Stripe)
Source: https://medium.com/@_adeel/nerding-out-with-the-amazon-iot-button-84a6e14b6b28#.ekd5hsnez
![Page 21: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/21.jpg)
How does it work?Invoke a Lambda function
Put object in an S3 bucket
Insert, Update, Read from a DynamoDB table
Publish to an SNS Topic or Endpoint
Publish to a Kinesis stream
Kinesis Firehose > Redshift
Republish to AWS IoT
AWS IoT
![Page 22: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/22.jpg)
All with no servers, of course
![Page 23: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/23.jpg)
I want to do this. Right now!
AWS IoT Button give away: facebook.com/ian.massingham.aws
Message ‘me’, Rate a Session 💬 Session ID: IoT Leeds
![Page 24: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/24.jpg)
HARDWARE YOU WILL (& MIGHT) NEED
• A Raspberry Pi
• Electronics Kit • Try the SunFounder 37 modules Sensor Kit v2.0 for Raspberry Pi
3, 2, Model B+ with 40-Pin GPIO Extension Board & Jump Wires • http://www.amazon.co.uk/dp/B014PF05ZA • Example tutorial
• Raspberry Pi Sense Hat (optional fun) • https://www.raspberrypi.org/products/sense-hat/
![Page 25: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/25.jpg)
SETTING UP FOR GPIO/SENSE HAT
Your own electronics/sensor build C (for embedded C)
http://wiringpi.com Python Wrapper Module for WiringPI
https://github.com/WiringPi/WiringPi-Python
For the Sense Hat Python Module
https://github.com/RPi-Distro/python-sense-hat
![Page 26: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/26.jpg)
SETTING UP FOR AWS IOT
Use the AWS Console to create your device
Download the required crypto materials & save the C header file contents with your endpoint, cert, and key details
Download & set up your chosen AWS IoT SDK Get them at : https://aws.amazon.com/iot/sdk/
Building the C SDK on the Raspberry Pi requires the CppUTest library from: https://github.com/cpputest/cpputest/releases/tag/v3.6
Get started with the sample applications that come with the AWS SDKs
![Page 27: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/27.jpg)
EXAMPLES & DEMOS
Emulating the AWS IoT Button (C++) https://github.com/ianmas-aws/iot-button-emulator
Controlling the Sense Hat via AWS IoT Device Shadow (Python) https://github.com/ianmas-aws/PiPyIoT
![Page 28: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/28.jpg)
![Page 29: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/29.jpg)
Go Build, Have Fun
Ian Massingham Technology Evangelist, AWS
IanMmmm
![Page 30: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/30.jpg)
1.
![Page 31: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/31.jpg)
2.
![Page 32: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/32.jpg)
2.
![Page 33: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/33.jpg)
3.
![Page 34: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/34.jpg)
4.
![Page 35: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/35.jpg)
Alert Someone: AWS IoT to AWS Lambda to SNS
Lambda Function
AWS IoT Rules Engine
PolicyPrivate Key & Certificate
Button
RuleSDK
AWS IoT
AWS Services
Execution Role Policy
SNS Topic
PermissionAction
SNS Topic Subscription
Rule: “Select * from ‘iotbutton/+’
Event Source
Function
SMS or Email
![Page 36: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/36.jpg)
Count items or Track Usage: AWS IoT to DynamoDB to Dashboard
DynamoDB
Rules Engine
Dashboard
S3 Website
Lambda Function
PolicyPrivate Key & Certificate
Button
RuleSDK
AWS IoT
AWS Services
Execution Role
PolicyPermissionAction
Rule: “Select * from ‘iotbutton/+’
Event Source
FunctionDynamoDB API Gateway
![Page 37: Leeds IoT Meetup - Nov 2017](https://reader031.vdocuments.site/reader031/viewer/2022030318/5a648d417f8b9a7c568b4b19/html5/thumbnails/37.jpg)
Start or Stop Something : AWS IoT to AWS Lambda to an External Endpoint
Lambda Function
Rules Engine
PolicyPrivate Key & Certificate
Thing/Device
RuleSDK
AWS IoT AWS Services
Execution Role Policy
External Endpoint
Permission
Rule: Select * from ‘iotbutton/+’
Action
External API
LifX API