+ All Categories
Home > Documents > BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification...

BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification...

Date post: 23-Jul-2018
Category:
Upload: phungque
View: 224 times
Download: 0 times
Share this document with a friend
59
BARCELONA ©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved
Transcript
Page 1: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

BARCELONA

©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved

Page 2: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

©2015, Amazon Web Services, Inc. or its affiliates. All rights reserved

Introducción a AWS IoT

Carlos Conde

@caarlco

Page 3: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

SMART CITIES

Page 4: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AIR QUALITY

Page 5: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 6: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 7: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

IT’S ALL ABOUT

SENSORS + DATA ANALYTICS

Page 8: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

INTEL EDISON

Page 9: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

INTEL EDISON

Page 10: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

+400 ARDUINO SHIELDSMAIN BOARD EXTENSIONS

Page 11: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AWS IoT

“Securely connect one or one billion devices to AWS,

so they can interact with applications and other devices”

Page 12: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AWS IoT

DEVICE SDKSet of client libraries to

connect, authenticate and

exchange messages

DEVICE GATEWAYCommunicate with devices via

MQTT and HTTP

AUTHENTICATION

AUTHORIZATIONSecure with mutual

authentication and encryption

RULES ENGINETransform messages

based on rules and

route to AWS Services

AWS Services

- - - - -

3P Services

DEVICE SHADOWPersistent thing state

during intermittent

connections

APPLICATIONS

AWS IoT API

DEVICE REGISTRYIdentity and Management of

your things

Page 13: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AWS IoT Message Broker

DEVICE GATEWAYCommunicate with devices via

MQTT and HTTP

Page 14: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

MQTT

MQTT vs HTTPS:

• 93x faster throughput

• 11.89x less battery to send

• 170.9x less battery to receive

• 50% less power to keep connected

• 8x less network overhead

Source:

http://stephendnicholas.com/archives/1217

• OASIS standard protocol (v3.1.1)

• Lightweight, pub/sub transport protocol

that is useful for connected devices

• MQTT is used on oil rigs, connected

trucks, and many more sensitive and

resource-sensitive scenarios.

• Customers have needed to build,

maintain and scale a broker to use

MQTT with cloud applications

Page 15: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AWS IoT Device Gateway

Standard Protocol Support (no lock-in)

Millions of devices and apps can connect

over any protocol starting with MQTT and

HTTP 1.1

Powerful Pub/Sub Broker with Long-

lived bi-directional messages

Clients (Devices and Apps) can receive

commands and control signals from the

cloud

Secure by Default

Connect securely via X509 Certs and TLS

1.2 Client Mutual Auth

Topic Based

Architecture

(lights/thing-2/color)

Highly Scalable

Device Gateway

Page 16: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AWS IoT Message Broker : Managed Service

Highly Scalable

Device Gateway

Millions of devices

sending billions of

messages

SubscribersPublishers

Page 17: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AWS IoT Security: Authentication and

AuthorizationAUTHENTICATION

Secure with mutual

authentication and encryption

AUTHENTICATION

AUTHORIZATIONSecure with mutual

authentication and encryption

Page 18: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

One Service, Two Protocols

MQTT + Mutual Auth TLS AWS Auth + HTTPS

Server Auth TLS + Cert TLS + Cert

Client Auth TLS + Cert AWS API Keys

Confidentiality TLS TLS

Protocol MQTT HTTP

Identification AWS ARNs AWS ARNs

Authorization AWS Policy AWS Policy

NEW

Page 19: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

Mutual Auth TLS

Page 20: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AWS IoT Rules Engine

RULES ENGINETransform messages

based on rules and

route to AWS Services

Page 21: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

Simple & Familiar Syntax

- SQL Statement to define topic filter

- Optional WHERE clause

- Advanced JSON support

Functions improve signal : noise

- String manipulation (regex support)

- Mathematical operations

- Context based helper functions

- Crypto support

- UUID, Timestamp, rand, etc.

AWS IoT Rules Engine Basics

SELECT * FROM ‘things/thing-2/color’

WHERE color = ‘red’

Page 22: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AWS IoT Rules Engine’s Flexibility

SELECT *, clientId() as MQTTClientId

FROM 'one/rule'

WHERE

startsWith(topic(2), 'IME33') AND

(state = 'INIT' OR hydro_temp >

surface_temp)",

"actions":

[{

"republish": {

"topic":

"controllers/${substring(topic(3),

3, 5)}",

}]

Page 23: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AWS IoT Rules Engine

Complex Evaluations

Respond to the fleet, not just a single unit. Dozens of functions() available

Multiple / Simultaneous Actions

Sometimes a situation requires you to take many actions

Page 24: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AWS IoT Rules Engine Actions

RULES ENGINETransform messages

based on rules and

route to AWS Services

AWS Services

- - - - -

3P Services

AWS Services

- - - - -

3P Services

Page 25: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

1. AWS Services(Direct Integration)

Rules Engine

Actions

AWS IoT Rules Engine

AWS

Lambda

Amazon

SNS

Amazon

SQS

Amazon

S3

Amazon

Kinesis

Amazon

DynamoDB Amazon RDS

Amazon

Redshift

Amazon Glacier

Amazon

EC2

3. External Endpoints(via Lambda and SNS)

Rules Engine connects AWS

IoT to External Endpoints and

AWS Services.

2. Rest of AWS(via Amazon Kinesis, AWS

Lambda, Amazon S3, and

more)

Page 26: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AWS IoT Rules Engine Actions

Rules Engine evaluates inbound

messages published into AWS

IoT, transforms and delivers to the

appropriate endpoint based on

business rules.

External endpoints can be

reached via Lambda and Simple

Notification Service (SNS).

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 an Amazon Kinesis

stream

Actions

Amazon Kinesis Firehose

Republish to AWS IoT

Page 27: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AWS IoT Rules Engine & Amazon SNS

Push Notifications

Apple APNS Endpoint, Google GCM Endpoint, Amazon ADM Endpoint, Windows WNS

Amazon SNS -> HTTP Endpoint (Or SMS or Email)

Call HTTP based 3rd party endpoints through SNS with subscription and retry support

SNS

2

Page 28: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 29: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

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

Page 30: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AWS IoT to AWS Lambda to and External Endpoint

Lambda Function

Rules Engine

PolicyPrivate Key

& Certificate

Thing/Device

RuleSDK

AWS IoT AWS Services

Execution

RolePolicy

External Endpoint

Permission

Select * from ‘iotbutton/+’

Action

Page 31: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AWS IoT to Amazon DynamoDB to Dashboard

DynamoDB Table

Rules Engine

PolicyPrivate Key

& Certificate

Thing/Device

RuleSDK

AWS IoT AWS Services

Policy

Dashboard

IAM

Role

Select * from ‘iotbutton/+’

ActionDynamoDB S3 Website

Page 32: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

Call an Uber cab

Order pizza

Start a car

Poke someone on Facebook

“Like” something on Facebook

Mayday button

Tweet Something

Call customer service

Slack it

Approve Expense reports

Count things

Track Things

Page 33: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 34: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 35: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 36: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 37: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 38: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

COFFEEBREAK

AWS EXPERT?

GET CERTIFIED!aws.amazon.com/certification

#awssummit

Page 39: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 40: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 41: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

TRENDS

IOT + MOBILE

Page 42: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 43: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

COLLECT / PROCESS / DISPLAY

Page 44: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

COLLECT / PROCESS / LEARN

Page 45: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

COLLECT / PROCESS / ACT

Page 46: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

Amazon.com

1994

Page 47: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

@caarlco

Page 48: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 49: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 50: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 51: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 52: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

AWS IoT

DEVICE SDKSet of client libraries to

connect, authenticate and

exchange messages

DEVICE GATEWAYCommunicate with devices via

MQTT and HTTP

AUTHENTICATION

AUTHORIZATIONSecure with mutual

authentication and encryption

RULES ENGINETransform messages

based on rules and

route to AWS Services

AWS Services

- - - - -

3P Services

DEVICE SHADOWPersistent thing state

during intermittent

connections

APPLICATIONS

AWS IoT API

DEVICE REGISTRYIdentity and Management of

your things

Page 53: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

Simple Pay as you go and Predictable Pricing

• Pay as you go. No minimum fees

• $5 per million messages published to, or delivered

in US East (N. Virginia), US West (Oregon), EU

(Ireland) $8 in Asia Pacific (Tokyo)

AWS IoT

Free Tier250,000 Messages Per Month Free for first 12

Months

Page 54: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

Pricing Example

100 sensors * 30 days

* 24 hours * 60

minutes =

4.38 million messages

1 meter * 100 readings * 30

days * 24 hours * 60

minutes =

4.38 million messages

100 Sensors:

Publishing 1x/minute

DynamoDB Table: Receives all Sensor Data

Metering Unit: Receives all Sensor Data

1 table * 100 readings * 30

days * 24 hours * 60

minutes =

4.38 million messages

4.38 million publishes from sensors: 4.38 * $5 = $21.90

4.38 million deliveries to a metering unit: 4.38 * $5 = $21.90

4.38 million deliveries to DynamoDB: $0

AWS IoT

Page 55: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

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)

Page 56: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

Official IoT Starter Kits, Powered by AWS

Page 57: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

Official IoT Starter Kits on Variety of Platforms

Broadcom WICED

BCM4343W

On Threadx/Netx

Marvell

EZConnect

MW302

On FreeRTOS

Renasas RX63N

On Micrium OS

TI CC3200

On TI-RTOSMicrochip WCM

PIC32 Platform

Intel Edison

on Yocto Linux

Mediatek

LinkOne

on Linkit OS

Dragonboard

410c on

Ubuntu

Seeeduino

Arduino on

openWRT

Beaglebone

Green on

Debian

Page 58: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required
Page 59: BARCELONA - Amazon S3 · • OASIS standard protocol (v3.1.1) ... Protocol MQTT HTTP Identification AWS ARNs AWS ARNs ... specific code or flashing required

BARCELONA


Recommended