47
AWSでできるIoT 18 Aug, 2015 Toshiaki Enami Partner Solution Architect Amazon Data Service Japan K.K.

HTML5J AWS でできるIoT

Embed Size (px)

Citation preview

  • AWSIoT18 Aug, 2015

    Toshiaki EnamiPartner Solution ArchitectAmazon Data Service Japan K.K.

  • [email protected]

    AWS Amazon Kinesis AWS Lambda

  • AWS

    2006 1130 190 48 (20156) Amazon.com$7B

  • Amazon Drone

  • Amazon Echo

  • Amazon Echo

    Voice Interaction Advanced Audio Design Connected home

    /News

    Q&A

  • Alexa Skill Kit (ASK)

    Amazon Echo

    AWS Lambda

  • AWS Lambda

  • Lambda functions:

  • AWS Lambda

  • Lambda

  • Bring your own code Node.jsJava

    / /tmpread/write

  • 100

    o 0.20 USD/1,000,000 o 0.000000208 USD/

    100ms(128MB)

    1 1,000,000

    400,000 GB/

  • IoT

  • Intel Edison AWS LambdaHello World

  • API Gateway Lambda

    http://****/device?operation=check&value=

  • API Gateway Lambda

    exports.handler = function(event, context) { var operation = event.operation; var value = event.value; switch (operation) { case 'check': if(value >= 100){ context.succeed(Hello World!'); }else{ context.succeed(Good Night'); } break; case 'echo': context.succeed(event); break; default: context.fail(new Error('Unrecognized operation "' + operation + '"')); } };

  • API Gateway Lambda

    var m = require('mraa'); var lcd = require('jsupm_i2clcd'); var request = require('request'); var intervalmsec = 1000; var analogPin0 = new m.Aio(0); var myLCD = new lcd.Jhd1313m1(6, 0x3E, 0x62); var clearStr = " "; var url = "https://***.execute-api.us-east-1.amazonaws.com/prod/device?operation=check&value="; var msg1 = 'Initialize'; var msg2 = ''; setInterval( function() { var value = analogPin0.read(); msg1 = 'Data: ' + value; var options = { url: url + value }; request.get(options, function (error, response, body) { if (!error && response.statusCode == 200) { msg2 = body; } else { msg2 = 'error: '+ response.statusCode; } }); myLCD.setColor(0, 255, 0); myLCD.setCursor(0,0); myLCD.write(clearStr); myLCD.setCursor(0,0); myLCD.write(msg1); myLCD.setCursor(1,0); myLCD.write(msg2); }, intervalmsec);

    API Gateway Web API

  • Amazon API Gateway

    RESTful API

    Lambda

  • AWS

  • Why AWS for IoT/M2M?

  • Why AWS for IoT/M2M?

    IoT/M2MAWS

  • Amazon CognitoAWS LambdaAmazon KinesisAmazon DynamoDBNoSQLAmazon S3Amazon RedshiftAmazon EMRHadoopAmazon SNS

    40

    Why AWS for IoT/M2M?

  • TECHNICAL & BUSINESS SUPPORT

    Account Management

    Support

    Professional Services

    Solutions Architects

    Training & Certification

    Security & Pricing Reports

    Partner Ecosystem

    AWS MARKETPLACE

    Backup

    Big Data & HPC

    Business Apps

    Databases

    Development

    Industry Solutions

    Security

    MANAGEMENT TOOLS

    Queuing

    Notifications

    Search

    Orchestration

    Email

    ENTERPRISE APPS

    Virtual Desktops

    Storage Gateway

    Sharing & Collaboration

    Email & Calendaring

    Directories

    HYBRID CLOUD MANAGEMENT

    Backups

    Deployment

    Direct Connect

    Identity Federation

    Integrated Management

    SECURITY & MANAGEMENT

    Virtual Private Networks

    Identity & Access

    Encryption Keys Configuration Monitoring Dedicated

    INFRASTRUCTURE SERVICES

    Regions Availability Zones Compute Storage Objects, Blocks, Files

    Databases SQL, NoSQL, Caching

    CDN Networking

    PLATFORM SERVICES

    APP

    Mobile & Web Front-end

    Functions

    Identity

    Data Store

    Real-time

    DEVELOPMENT

    Containers

    Source Code

    Build Tools

    Deployment

    DevOps

    MOBILE

    Sync

    Identity

    Push Notifications

    Mobile Analytics

    Mobile Backend

    ANALYTICS

    Data Warehousing

    Hadoop

    Streaming

    Data Pipelines

    Machine Learning

  • AmazonIoT

  • Device Interface (HTTP/HTTPS, MQTT, Websockets etc )

    Device Management

    Service

    Notification / Command Visualize Data Analysis

    Firmware Capability

    Status

    Machine Learning

    External System Interface Data Archive

    Event Processing

    Data Processing

    IoT/M2M

  • AWS

    S3

    Kinesis

    DynamoDB

    Data Collection and Storage

    AWS Lambda

    KCL Apps

    Event Processing

    EMR Redshi;

    MachineLearning

    Data Processing

    Data Analysis

  • AWS

    S3

    Kinesis

    DynamoDB

    Data Collection and Storage

    AWS Lambda

    KCL Apps

    Event Processing

    EMR Redshi;

    MachineLearning

    Data Processing

    Data Analysis

  • 1

    API

    Amazon S3(Simple Storage Service)

    " " 99.999999999%" 1GByte $0.033 -

    S3

    Tokyo

  • Amazon Kinesis

    Data Sources

    AW

    S En

    dpoint

    App.1

    [Aggregate & De-Duplicate]

    Data Sources

    Data Sources

    S3

    Redshift

    App.3 [Sliding Window Analysis]

    Availability Zone

    Shard 1 Shard 2 Shard N

    Availability Zone

    Availability Zone

    Amazon Kinesis

    INPUT OUTPUT

    "

    (3AZ, 24h)

    Pluggable

  • &

    HTTP Post

    AWS SDK

    LOG4J

    Flume

    Fluentd

    Get* APIs

    Kinesis Client Library + Connector Library

    Apache Storm

    Amazon Elastic MapReduce

    AWS Mobile SDK

    Apache Spark Streaming

  • Data RecordShard

    Stream

    Shard-0

    Shard-1

    DataRecord

    DataRecord

    DataRecord

    DataRecord

    (Max 1M)

    (Max 256B)

  • KinesisStream 24

    SeqNo(14)

    SeqNo(17)

    SeqNo(25)

    SeqNo(26)

    SeqNo(32)

    Stream

  • AWS

    S3

    Kinesis

    DynamoDB

    Data Collection and Storage

    AWS Lambda

    KCL Apps

    Event Processing

    EMR Redshi;

    MachineLearning

    Data Processing

    Data Analysis

  • EMR Hadoop

    Hadoop

    Elastic MapReduceEMR

    AWSHadoop

    Hadoop

    Spot

    ETLHadoop

  • Amazon Redshift

    " DB

    " BI/SQL" 2PB"

    30/ DWH1/10

    1100

    Redshift

  • Spark Streaming,

    Storm

    Amazon Kinesis

    Amazon DynamoDB

    Native ClientAWS Lambda

    Amazon S3

    AmazonRedshift

    Native ClientAWS Lambda

    SparkPresto Hive

    KCL

  • dash11TB

  • OpenBlocksIoT BX1

    Amazon Cognito

    Amazon Kinesis

    - -

    AWS Lambda

    Amazon EC2

    3259,200

  • IoT AWS