+ All Categories
Home > Technology > Leeds IoT Meetup - Nov 2017

Leeds IoT Meetup - Nov 2017

Date post: 21-Jan-2018
Category:
Upload: ian-massingham
View: 101 times
Download: 2 times
Share this document with a friend
38
© 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
Transcript
Page 1: Leeds IoT Meetup - Nov 2017

© 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

IoT Applications : An Early Use Case for AWS

Page 3: Leeds IoT Meetup - Nov 2017

Today, The Most Successful IoT Deployments Run On AWS

Page 4: Leeds IoT Meetup - Nov 2017

Remove Constraints & Build the IoT with AWS

Page 5: Leeds IoT Meetup - Nov 2017

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

The AWS IoT Platform

Your AppThings

AWS IoTDevice

GatewayRules

Registry

Shadow

S3 DynamoDB Kinesis Lambda….

Page 7: Leeds IoT Meetup - Nov 2017

AWS IoT

Page 8: Leeds IoT Meetup - Nov 2017

What Constitutes On-Premises Infrastructure?

Sensors & IoT DevicesData CentreInfrastructure

Page 9: Leeds IoT Meetup - Nov 2017

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

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

AWS Greengrass: Local Compute, Messaging & Data Caching

Local compute

Local data caching

Securecommunications

Local messaging

Page 12: Leeds IoT Meetup - Nov 2017

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

Amazon Greengrass: Example Use Cases

Smart Homes Agriculture Manufacturing

Page 14: Leeds IoT Meetup - Nov 2017

Building ‘Hello World’ (for IoT Developers)

Page 15: Leeds IoT Meetup - Nov 2017
Page 16: Leeds IoT Meetup - Nov 2017

Turns out, developers are creative

Page 17: Leeds IoT Meetup - Nov 2017

Sassy Ping PongScore Keeper

Source: https://www.hackster.io/youngd/ping-pong-showdown-eabaed

Page 18: Leeds IoT Meetup - Nov 2017

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

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

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

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

All with no servers, of course

Page 23: Leeds IoT Meetup - Nov 2017

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

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

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

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

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
Page 29: Leeds IoT Meetup - Nov 2017

Go Build, Have Fun

Ian Massingham Technology Evangelist, AWS

IanMmmm

Page 30: Leeds IoT Meetup - Nov 2017

1.

Page 31: Leeds IoT Meetup - Nov 2017

2.

Page 32: Leeds IoT Meetup - Nov 2017

2.

Page 33: Leeds IoT Meetup - Nov 2017

3.

Page 34: Leeds IoT Meetup - Nov 2017

4.

Page 35: Leeds IoT Meetup - Nov 2017

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

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

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

Page 38: Leeds IoT Meetup - Nov 2017

Thank You. Any Questions?You can reach me via email at [email protected]

@IanMmmm


Recommended