More Related Content
Similar to AWS re:Invent 2019 Recap IoT アップデート (20)
More from Amazon Web Services Japan (20)
AWS re:Invent 2019 Recap IoT アップデート
- 2. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
re:Invent 2019 IoT アップデート
- 3. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT Events
AWS IoT Service Suite
AWS IoT Analytics
AWS IoT SiteWise
AWS IoT Device
Management
AWS IoT
Things Graph
AWS IoT Core
AWS IoT
Device Defender
AWS IoT
Device SDK
Amazon FreeRTOS
AWS IoT
Device Tester
AWS IoT
Greengrass
- 4. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT Events
AWS IoT Service Suite
AWS IoT Analytics
AWS IoT SiteWise
AWS IoT Device
Management
AWS IoT
Things Graph
AWS IoT Core
AWS IoT
Device Defender
AWS IoT
Device SDK
Amazon FreeRTOS
AWS IoT
Device Tester
AWS IoT
Greengrass
- 5. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT Service Suite
AWS IoT
Device SDK
Amazon FreeRTOS
AWS IoT
Device Tester
AWS IoT
Greengrass
- 6. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT Greengrass
Data and
State Sync Security
Over the
Air UpdatesConnectors
オフラインでもデ
バイスを操作 &
再接続時にデータ
を同期
Local
Actions
デバイスプログラ
ミングを Lambda
で簡単化
クラウドとデバ
イス間の相互認
証と認可
AWS IoT
Greengrass Core
を簡単にアップ
デート
Machine
Learning
Inference
ローカルでの ML
推論
Local
Resource
Access
Lambda からデ
バイスのローカ
ルリソースにア
クセス
エッジデバイス
を外部サービス
と接続
Local
Messages
and Triggers
クラウド接続な
しでデバイスが
相互に通信
Secrets
Manager
エッジデバイス
にシークレット
をデプロイ
- 7. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Stream Manager for AWS IoT Greengrass
• ストリームデータをローカルで処理し、クラウドに⾃動でエクスポート
• ⾼頻度、⼤容量なデータをローカルでストリーミング処理しつつ、IoT Analytics や Kinesis
Data Streams に⾃動的にエクスポートできる
• 不安定な通信環境やデバイスのリソース制約を考慮しており、ストリームごとの優先度や
キャッシュポリシー、許容する帯域幅を指定することができる
AWS IoT Greengrass Core
Stream Managerセンサ
アクター
データ収集
ML 推論
Write
Read
Write
センサデータのエクスポート
推論結果のエクスポート
AWS IoT Analytics
Amazon Kinesis
Data Streams
センサデータ
アラート
- 8. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Stream Manager を利⽤する⼿順
1. Greengrass Core の Stream Manager 機能を有効化
• Stream Manager ⾃体は Java で書かれているため、Java 8 の install が必要
• ローカルの保存先、クライアント認証の有無、最⼤帯域幅やスレッドプールサイズを指定
2. 各 Stream を定義
• クラウドのエクスポート先を指定 (Kinesis, IoT Analytics)
• 転送の Priority を指定
• Batch Size および Interval を指定 (どちらかの条件に到達すると Export)
• TTL, 保存先(メモリ or ファイル) を指定
Stream Manager
1. Stream
Manager 全体
の設定を定義
(Greengrass
Deploy 時)
1. Stream
Manager 全体
の設定を定義
2. 各 Stream
の設定
(lambda か
ら)
- 9. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Stream Manager を⽤いたローカル処理
1. Local Lambda から Greengrass Core SDKのStreamManagerClientを
使⽤
• 現状 Python 3.7 もしくは Java 8 の Local Lambda 向けの SDK のみ対応
2. appendMessage で書き込み、readMessage で読み込み
• readMessage では取得したい最低メッセージ数、最⼤メッセージ数、タイムアウトを指定
• これにより Local Lambda がデータをまとめて処理することができる
Stream Manager
Append Readセンサデータ
AWS IoT Greengrass Core
Greengrass
Core SDK
Greengrass
Core SDK
指定メッセージサイズ
もしくは時間まで
Blocking してデータを
まとめて処理
StreamManager に
アクセスするには
Greengrass Core
SDK を利用
- 10. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Stream Manager によるエクスポート
1. Stream にデータを書き込むだけで⾃動エクスポート
2. オフライン時は指定したサイズ、期間の範囲でキャッシュ
3. オンライン復旧時に設定した帯域幅、優先度でアップロード
AWS IoT Greengrass Core
Stream Manager
データ収集
ML 推論
Write
Read
Write
センサデータのエクスポート
Priority : Low
推論結果のエクスポート
Priority : High
AWS IoT Analytics
Amazon Kinesis
Data Streams
センサデータ
プログラムは
オフラインの
ハンドリング
を意識しない
オフライン
のデータを
ローカルで
キャッシュ
設定した帯域
幅、優先度で
アップロード
- 11. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Docker Application Deployment Connector
for AWS IoT Greengrass
• Docker Compose を⽤いたアプリケーション向けの Connector が追加
• 任意の docker-compose.yml で Docker アプリケーションを起動
• Amazon ECR や Private Repository からコンテナを取得可能
docker-
compose.yml
docker-
compose.yml
- 12. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ユースケース
• コンテナを使ったエッジ運⽤を実現したい
• アプリケーションをコンテナ化して Greengrass で管理する
• 複雑なアプリケーションを実⾏したい
• ライブラリや設定ファイル、バイナリ、データベースなどを含むようなアプリケーション
• ゲートウェイで管理画⾯・ダッシュボードを表⽰したい
• デバイスローカルのウェブアプリでMQTTトピックに送受信
• Lambda では扱えない⾔語を⽤いたローカル処理
• GG Lambdaで扱える⾔語: Java, Node.js, Python, C
• デバイス環境とライブラリなどの依存関係を分離したい場合
• OS側のパッケージマネージャで未サポートの新しい(古い)バージョンを利⽤
- 13. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
特⻑
• Docker Private Registry の利⽤時の credential 管理が容易
• Amazon Elastic Container Registry (ECR) からコンテナを取得可能
• Private Registry の認証情報を Secrets Manager で管理
• コンテナ起動の実⾏結果を MQTT で取得可能
• (注意) ログデータをCloudWatch Logsへ送る機能は無い(2019/12/19時点)
• Greengrass のローカル Lambda との間で通信可能
• コンテナ側で REST API で待ち受け
• MQTT で GG のブローカーと接続
• Docker に Lambda と共有するファイルをマウント
- 14. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
使い⽅
1. デバイス側の設定
• Docker, docker-compose をインストール
• Docker ⽤のユーザを作成&グループ設定
2. GG のグループロールの権限設定
• S3 のオブジェクト取得
• (必要に応じて) ECR のコンテナダウンロード権限
3. docker-compose.yml を S3 にアップロード
4. コネクタの設定
• S3バケット
• Private Registry ⽤の認証情報(必要な場合)
• ローカルでの docker-compose.yml ファイルパス
• Docker ⽤のユーザID
5. デプロイ
- 15. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT Service Suite
AWS IoT Device
Management
AWS IoT Core
AWS IoT
Device Defender
- 16. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT Core
Messages
Device Gateway
Identity Service
Messages
Applications
Device Shadow
Message Broker
API
Registry
Actions
API
Rules Engine
AWS and non-AWS
Services
Analytics
Amazon Kinesis
Artificial Intelligence
Amazon EMR
Messaging
Amazon SQS
Amazon SNS
Database
Amazon Redshift
Amazon DynamoDB
Manage
Amazon CloudWatch
AWS IoT Core
- 17. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT Core のアップデート
• Identity
• Fleet Provisioning
• Custom authentication enhancements (beta)
• Device gateway
• Configurable endpoints (beta)
• Custom domains (beta)
• Rule engine
• Http Action
• Alexa
• AWS IoT Core ‒ MQTT for Alexa Voice
- 18. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ご参考) 過去ご紹介した bootstrapping の実装例
Amazon
DynamoDB
AWS IoT
AWS IoT
AWS
Lambda
response/topic
プリインする証明書のpolicyは初期化用のMQTT
topicのみが実行できるようにする
初回ユーザ登録などと合わせてHTTP requestで
証明書を生成して返却する
AWS
Lambda
device
device
Amazon API
Gateway
ユーザ情報登録や、製品チェックロジックの実装
を行い証明書を発行
証明書発行
証明書発行
最終的にはdevice個別
の証明書でMQTTセッ
ションを再度作成
証明書情報
- 19. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Fleet Provisioning
AWS IoT Core
IoT
certificate
per device
IoT certificate
(for provision
lmited)
AWS Cloud
IoT
certificate
per device
信頼された
IAMベースでの
作業
thingへの転送
publicBeta
• 事前登録したtemplateに合わせて
個別証明書を返却する仕組み
• 2つの利⽤⽅法
• プロビジョニング専⽤の証明書を使い初回
起動時に個別証明書を発⾏
(MQTT通信ベース)
• 信頼された⼈間がウェブ/モバイルアプリを
使って初回起動時に個別証明書発⾏
(IAMとの紐づけでのSTSによる作業)
- 20. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Configurable Endpoints
publicBeta
• AWS IoT Core の Endpoint をカスタマイズすることで、独⾃ broker を
DNS 切り替えのみで移⾏可能に(us-east-1のみ)
• Custom Domain
• Custom Authorizer
• TLS Configuration (Coming soon)
*.amazonaws.com の代
わりに任意のドメイン
を利用可能に。
Minimum TLS version
や、利用可能な Cipher
Suite を指定できる
(coming soon)
MQTT の
username/password によ
る認証をサポート。
もともとの Custom Auth
Token も改善
AWS
Certificate Manager
カスタムドメインに紐
づくサーバ証明書を登
録。得られる ARN を
AWS IoT に設定
- 21. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
HTTPSリクエストをAWS IoT Coreのルールエンジン
から直接発⾏可能に
• AWS Lambdaなどのサービス
不要でIoT Rule Engineから直
接API発⾏が可能
• AWS Lambdaなどのサービスの起動/
処理時間が短縮、コストダウン
• ルールエンジンから呼び出せるアク
ションが17個に
- 22. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Alexa Voice ServiceとAWS IoT Coreの統合
• 家電製品⽤などの軽量のMCU
上で困難な処理をクラウド側
へオフロード可能に
• オーディオ転送⽤の専⽤MQTTトピッ
クの提供
• デバイスのマイク/スピーカー、デバ
イスステータスを管理するAPIの提供
• Wake wordやcancel wordなどのクラ
ウド連携の起点はenable deviceが管理
• AVS対応のためのハードウェ
ア開発コストを削減可能
- 23. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
https://www.nxp.com/design/designs/mcu-based-
solution-for-br-alexa-voice-service:MCU-VOICE-
CONTROL-AVS
https://www.qualcomm.com/products/qualcomm-
home-hub-100-dev-kit-amazon-avs
NXP i.MX RT 106 A Qualcomm Home Hub 100 Development Kit
- 24. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
出荷時にデバイス群
のプロビジョニング
をバッチ処理
リアルタイムに
デバイス群を
Indexして検索
デバイスの
細やかなロギング
とモニタリング
OTA
(over the air)
でのupdate
⼤量のデバイス管理をより簡単に
AWS IoT Device Management
- 25. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT Device Management のAPIがアップデート
• モノの集約情報を取得するための3つのAPIが追加、⼤量の
デバイスの状態の確認や監視を容易に⾏えるように
• GetStatistics
• クエリに⼀致するモノの総数、フィールドの値の平均、合計、最⼤、最⼩、
⼆乗和、分散、標準偏差を取得
• GetPercentiles
• クエリに⼀致するモノのフィールドの値の、任意のパーセンタイルにおける
近似値を取得
• GetCardinality
• クエリに⼀致するモノのフィールドの値のユニークな総数を取得
- 26. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
使い⽅- Get Statistics
ThingName Temp
Sensor0
Temp
Sensor1
Temp
Sensor2
Temp
Sensor3
Temp
Sensor4
Temp
Sensor5
Temp
Sensor6
Temp
Sensor7
Temp
Sensor8
Temp
Sensor9
temperature 70 71 72 73 74 75 47 97 98 99
rackId Rack1 Rack1 Rack2 Rack2 Rack3 Rack4 Rack5 Rack6 Rack6 Rack6
stateNormal true true true true true true false false false false
$ aws iot get-statistics --aggregation-field "attributes.temperature" --query-string
"thingName:TempSensor*”
{
"statistics": {
"count": 10,
"average": 77.6,
"sum": 776.0,
"minimum": 47.0,
"maximum": 99.0,
"sumOfSquares": 62578.0,
"variance": 236.04000000000013,
"stdDeviation": 15.36359332968691
}
}
temperature の統計値
- 27. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
使い⽅- Get Percentiles
$ aws iot get-percentiles --aggregation-field "attributes.temperature”
--query-string "thingName:TempSensor*" --percents 10 25 50 75 90
{
"percentiles": [
{ "percent": 10.0, "value": 67.7 },
{ "percent": 25.0, "value": 71.25 },
{ "percent": 50.0, "value": 73.5 },
{ "percent": 75.0, "value": 91.75 },
{ "percent": 90.0, "value": 98.1 }
]
}
指定された Percentile での
temperature の値
ThingName Temp
Sensor0
Temp
Sensor1
Temp
Sensor2
Temp
Sensor3
Temp
Sensor4
Temp
Sensor5
Temp
Sensor6
Temp
Sensor7
Temp
Sensor8
Temp
Sensor9
temperature 70 71 72 73 74 75 47 97 98 99
rackId Rack1 Rack1 Rack2 Rack2 Rack3 Rack4 Rack5 Rack6 Rack6 Rack6
stateNormal true true true true true true false false false false
- 28. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Secure Tunneling
• セキュアトンネリングを⽤いることで、ファイアウォール内のIoTデバイスに対す
るリモートアクセスが可能
• 出荷後のデバイスのトラブルシューティングが容易に
0. Localproxy アプリケー
ションを install しておく
(各 OS, HW に対応)
2. 専用トピックに
publish される
token を取得して
local proxy を起動
1. トンネルを作成
3. Token を利
用して remote
shell でアクセ
ス
4. プロキシ経由でリ
モートアクセス
(Websocket)
- 29. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
IoT デバイスの
設定をセキュア
に保つ
異常な振る舞い
を検出する
アラートを
受け取る
セキュリティ
の問題を修正
する
AWS IoT Device Defender
- 30. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT Device Defender に関するアップデート
• 4種類の監査項⽬が追加
1. 過剰な権限(Admin権限、セキュリティ監査サービス等)
2. 365⽇以上未使⽤のサービスへのアクセスが許可されて
いるか
3. DebianベースのOSで脆弱性のあるOpenSSLのバージョ
ン(CVE-2008-0166)を使⽤している
4. 脆弱性(CVE-2017-15361)のあるInfineon RSAのライブ
ラリを使⽤した場合
※ 3, 4 はCA証明書、デバイス証明書の⽣成時に使⽤した場合
- 31. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT Events
AWS IoT Service Suite
AWS IoT Analytics
AWS IoT SiteWise
AWS IoT
Things Graph
- 32. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT SiteWise
publicBeta
- 33. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT SiteWise ‒ データ収集
- 34. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT SiteWise ‒ アセットモデリング
- 35. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT SiteWise ‒ モデルの階層化
- 36. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT SiteWise ‒ データの保存と外部連携
- 37. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT SiteWise Monitor
- 38. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
- 39. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Kinesis Video Streams
- 40. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Amazon Kinesis Video Streams が WebRTC をサポート
• WebRTC によるリアルタイムの双⽅向メディアストリーミング
• マネージドのシグナリングチャネル / STUN / TURN を提供
• C, JavaScript, Android, iOS の SDK を提供
- 41. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
KVS with WebRTC
• WebRTCでの通信のために必要なクラウド側のインフラをフルマネージ
ドで提供
• 接続の開始や制御のために必要なシグナリング
• P2P接続失敗時のメディアリレー
• C, JavaScript(NodeJS), iOS, Android の SDK を提供
• 想定されるユースケース
• ホームセキュリティカメラ、⾒守りカメラ
• ドアホン
• カメラ付のロボット掃除機をスマートホンから制御
- 42. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
SDK の特徴
• C SDK
• サポートするメディア形式
• Video: H.264, VP8
• Audio: Opus, G711
• Trickle ICE をサポート
• 通信の確⽴までの時間を短縮
• Client SDKs
• JavaScript
• Android / iOS
- 43. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
デモ
• Kinesis Video Stream WebRTC
• https://docs.aws.amazon.com/kinesisvideostreams-webrtc-dg/latest/devguide/kvswebrtc-
sdk-ios.html
• AWS Greengrass Stream Manager
• https://docs.aws.amazon.com/greengrass/latest/developerguide/stream-manager-
console.html
• AWS Greengrass Docker Connecter
• https://aws.amazon.com/jp/blogs/news/new-aws-iot-greengrass-adds-docker-support-
and-streams-management-at-the-edge/
- 44. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
- 45. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS IoT関連のセッション情報
• 資料
• https://aws.amazon.com/jp/events/events-content/
• IoTで絞り込んでください
• 動画
• https://www.youtube.com/playlist?list=PL2yQDdvlhXf85CDFKMRyrj3ltMAOJENWF
• 代表的なセッションの紹介
• https://aws.amazon.com/jp/blogs/news/aws-reinvent-2019-iot-session-guide/
- 46. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
- 47. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Belkin様: 家電プラットフォームの移⾏
• https://www.youtube.com/watch?v=gPyOT6HjS_k
• iDevice/NXP様: Alexa機能内蔵スマートスイッチを開発
• https://www.youtube.com/watch?v=4v3BXtv7g2k
• Volkswagen様: 製造⼯場の統合プラットフォーム
• https://www.youtube.com/watch?v=gmadwtPTW4g
- 48. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Appendix
- 49. © 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
• Stream Manager for AWS IoT Greengrass
• Docker Application Deployment Connector for AWS IoT Greengrass
• Fleet Provisioning
• Configurable Endpoints
• HTTPSリクエストをAWS IoT Coreのルールエンジンから直接発⾏可能に
• Alexa Voice ServiceとAWS IoT Coreの統合
• AWS IoT Device Management のAPIがアップデート
• Secure Tunneling
• AWS IoT Device Defender に関するアップデート
• AWS IoT SiteWise
• Amazon Kinesis Video Streams が WebRTC をサポート
今回ご紹介したUpdateの詳細リンク集
- 50. Thank you!
© 2019, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS 公式 Webinar
https://amzn.to/JPWebinar
過去資料
https://amzn.to/JPArchive