Leeds IoT Meetup - Nov 2017

Post on 21-Jan-2018

101 views 2 download

transcript

© 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

IoT Applications : An Early Use Case for AWS

Today, The Most Successful IoT Deployments Run On AWS

Remove Constraints & Build the IoT with AWS

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

The AWS IoT Platform

Your AppThings

AWS IoTDevice

GatewayRules

Registry

Shadow

S3 DynamoDB Kinesis Lambda….

AWS IoT

What Constitutes On-Premises Infrastructure?

Sensors & IoT DevicesData CentreInfrastructure

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

AWS GreengrassEmbed Lambda Compute (& Other AWS Services) in Connected Devices

Available Now

Use The Same AWS Programming Model In Devices And The Cloud

AWS Greengrass: Local Compute, Messaging & Data Caching

Local compute

Local data caching

Securecommunications

Local messaging

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

Amazon Greengrass: Example Use Cases

Smart Homes Agriculture Manufacturing

Building ‘Hello World’ (for IoT Developers)

Turns out, developers are creative

Sassy Ping PongScore Keeper

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

Slack-powered Doorbell

Source: www.theatlantic.com/notes/2016/07/make-every-week-2-a-silent-slack-powered-doorbell/490880/

Source: http://www.andrewmcgill.me/2016/08/19/make-every-week-sweetgreen-salad-button.html

EmergencySweet Green Ordering

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

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

All with no servers, of course

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

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/

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

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

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

Go Build, Have Fun

Ian Massingham Technology Evangelist, AWS

IanMmmm

1.

2.

2.

3.

4.

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

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

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

Thank You. Any Questions?You can reach me via email at ianm@amazon.com

@IanMmmm