Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
IoT だけじゃない!? AWS IoT Events の真骨頂 / aws-iot-even...
Search
tomoki10
April 21, 2021
Technology
0
4.4k
IoT だけじゃない!? AWS IoT Events の真骨頂 / aws-iot-events-ones-true-value
AKIBA.AWS ONLINE #02 の登壇資料です。
https://dev.classmethod.jp/news/akiba-aws-210421/
tomoki10
April 21, 2021
Tweet
Share
More Decks by tomoki10
See All by tomoki10
CDK Vibe Coding Fes
tomoki10
1
790
cdk initで生成されるあのファイル達は何なのか/cdk-init-generated-files
tomoki10
1
940
Devin(Deep) Wiki/Searchの活用で変わる開発の世界観/devin-wiki-search-impact
tomoki10
0
2k
AI駆動で進化する開発プロセス ~クラスメソッドでの実践と成功事例~ / aidd-in-classmethod
tomoki10
2
3.5k
DevinはクラウドエンジニアAIになれるのか!? 実践的なガードレール設計/devin-can-become-a-cloud-engineer-ai-practical-guardrail-design
tomoki10
3
3k
AWS CDKの歴史と未来について語る会〜日本発のグローバルコントリビューション〜/jaws-days-2025-cdk-panel-discussion
tomoki10
0
140
いまから始めるAWS CDK 〜モダンなインフラ構築入門〜/iac-night-cdk-introduction
tomoki10
9
2.8k
DevinでAI AWSエンジニア製造計画 序章 〜CDKを添えて〜/devin-load-to-aws-engineer
tomoki10
0
730
CDKのコードレビューを楽にするパッケージcdk-mentorを作ってみた/cdk-mentor
tomoki10
0
510
Other Decks in Technology
See All in Technology
JOAI発表資料 @ 関東kaggler会
joai_committee
1
260
小さなチーム 大きな仕事 - 個人開発でAIをフル活用する
himaratsu
0
120
広島発!スタートアップ開発の裏側
tsankyo
0
240
モバイルアプリ研修
recruitengineers
PRO
2
220
AIが住民向けコンシェルジュに?Amazon Connectと生成AIで実現する自治体AIエージェント!
yuyeah
0
260
RAID6 を楔形文字で組んで現代人を怖がらせましょう(実装編)
mimifuwa
0
300
つくって納得、つかって実感! 大規模言語モデルことはじめ
recruitengineers
PRO
19
4.9k
Gaze-LLE: Gaze Target Estimation via Large-Scale Learned Encoders
kzykmyzw
0
310
夢の印税生活 / Life on Royalties
tmtms
0
280
Goss: New Production-Ready Go Binding for Faiss #coefl_go_jp
bengo4com
0
1.1k
EKS Pod Identity における推移的な session tags
z63d
1
200
mruby(PicoRuby)で ファミコン音楽を奏でる
kishima
1
220
Featured
See All Featured
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.4k
Why Our Code Smells
bkeepers
PRO
338
57k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
890
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
Java REST API Framework Comparison - PWX 2021
mraible
33
8.8k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Documentation Writing (for coders)
carmenintech
73
5k
Transcript
IoT ͚ͩ͡Όͳ͍!? AWS IoT Events ͷਅࠎ AKIBA.AWS ONLINE #02 2021/4/21
CXࣄۀຊ෦ ࠤ౻ஐथ 1
2 ࣗݾհ • ࠤ౻ஐथ • Ϋϥεϝιουגࣜձࣾ • CXࣄۀຊ෦ʢνʔϜIoTʣ • લ৬ɿSIerͷSEΛ4ऑ
• ݱࡏɿαʔόʔαΠυΤϯδχΞ • ͖ͳAWSαʔϏεɿLambdaɺCDK @tmk2154 @tomoki10
3 ͡Ίʹ IoT Events ͷ׆༻ IoT ʹͱͲ·Βͳ͍!? =>໊͚͋͑ͯ͢ΔͳΒ ɹ Serverless
Automaton
4 ରͷཧ ࢹௌऀͷΠϝʔδ • ͋Δఔ AWS ͍ͬͯΔɻLambdaͬͯΔ • IoT Events
΄΅Βͳ͍ɻ໊લฉ͍͔ͨΓ ඪ • IoT Events Λͬ͘͟Γཧղ͢Δ • ঢ়ଶཧλΠϚʔͷ࣮ʹ͑Δ͜ͱΛཧղ͢Δ
5 ֓ཁ • IoT Events ͱԿ͕Ͱ͖ΔαʔϏεͳͷ͔ʁ • IoT Events ͷར
• IoT Events ͱͦͷଞαʔϏεͱͷൺֱ
6 ֓ཁ • IoT Events ͱԿ͕Ͱ͖ΔαʔϏεͳͷ͔ʁ • IoT Events ͷར
• IoT Events ͱͦͷଞαʔϏεͱͷൺֱ
7 IoT Events ͱԿ͕Ͱ͖ΔαʔϏεͳͷ͔ʁ • ެࣜͷհ(αʔϏεϖʔδΑΓ) https://aws.amazon.com/jp/iot-events/
8 IoT Events ͱԿ͕Ͱ͖ΔαʔϏεͳͷ͔ʁ ͳΔ΄Ͳ Θ͔ΒΜ
9 IoT Events ͱԿ͕Ͱ͖ΔαʔϏεͳͷ͔ʁ • ެࣜͷհ(Black Belt ΑΓ) https://www.slideshare.net/AmazonWebServicesJapan/20200916-aws-black-belt-online-seminar-aws-iot-events#12
10 IoT Events ͱԿ͕Ͱ͖ΔαʔϏεͳͷ͔ʁ • ެࣜͷհ(Black BeltΑΓ) https://www.slideshare.net/AmazonWebServicesJapan/20200916-aws-black-belt-online-seminar-aws-iot-events#16
• ެࣜͷհ(Black BeltΑΓ) 11 IoT Events ͱԿ͕Ͱ͖ΔαʔϏεͳͷ͔ʁ https://www.slideshare.net/AmazonWebServicesJapan/20200916-aws-black-belt-online-seminar-aws-iot-events#16 ൣғ ൣғ֎
ਤ ɿσόΠε Ξϥʔτର
12 IoT Events ͷྲྀΕΛͬ͘͟Γղઆ ։࢝Ґஔ ભҠ݅ ঢ়ଶ AWS IoT Core
IoT rule IoT Device (GPS) AWS IoT Events ◦ ॲཧͷྲྀΕྫ GPSσʔλΛৗʹIoT Ruleʹૹ৴ ↓ ൣғ͔ભҠ݅ͰνΣοΫ ↓ ݅ద߹ʂΞΫγϣϯ࣮ߦ ↓ ঢ়ଶભҠ
13 IoT Events ͷྲྀΕΛͬ͘͟Γղઆ ભҠ݅ ঢ়ଶ AWS IoT Core IoT
rule IoT Device (GPS) AWS IoT Events ◦ ॲཧͷྲྀΕྫ GPSσʔλΛৗʹIoT Ruleʹૹ৴ ↓ ൣғ͔ભҠ݅ͰνΣοΫ ↓ ݅ద߹ʂΞΫγϣϯ࣮ߦ ↓ ঢ়ଶભҠ ։࢝Ґஔ
14 IoT Events ͷྲྀΕΛͬ͘͟Γղઆ ։࢝Ґஔ ભҠ݅ ঢ়ଶ AWS IoT Core
IoT rule IoT Device (GPS) AWS IoT Events ◦ ॲཧͷྲྀΕྫ GPSσʔλΛৗʹIoT Ruleʹૹ৴ ↓ ൣғ͔ભҠ݅ͰνΣοΫ ↓ ݅ద߹ʂΞΫγϣϯ࣮ߦ ↓ ঢ়ଶભҠ
15 IoT Events ͷྲྀΕΛͬ͘͟Γղઆ ։࢝Ґஔ ભҠ݅ ঢ়ଶ AWS IoT Core
IoT rule IoT Device (GPS) AWS IoT Events ◦ ॲཧͷྲྀΕྫ GPSσʔλΛৗʹIoT Ruleʹૹ৴ ↓ ൣғ͔ભҠ݅ͰνΣοΫ ↓ ݅ద߹ʂΞΫγϣϯ࣮ߦ ↓ ঢ়ଶભҠ
16 IoT Events ͷྲྀΕΛͬ͘͟Γղઆ ։࢝Ґஔ ભҠ݅ ঢ়ଶ AWS IoT Core
IoT rule IoT Device (GPS) AWS IoT Events ◦ ॲཧͷྲྀΕྫ GPSσʔλΛৗʹIoT Ruleʹૹ৴ ↓ ൣғ͔ભҠ݅ͰνΣοΫ ↓ ݅ద߹ʂΞΫγϣϯ࣮ߦ ↓ ঢ়ଶભҠ Amazon SNS
17 IoT Events ͷྲྀΕΛͬ͘͟Γղઆ ։࢝Ґஔ ભҠ݅ ঢ়ଶ AWS IoT Core
IoT rule IoT Device (GPS) AWS IoT Events ◦ ॲཧͷྲྀΕྫ GPSσʔλΛৗʹIoT Ruleʹૹ৴ ↓ ൣғ͔ભҠ݅ͰνΣοΫ ↓ ݅ద߹ʂΞΫγϣϯ࣮ߦ ↓ ঢ়ଶભҠ
18 IoT Events ͷྲྀΕΛͬ͘͟Γղઆ ։࢝Ґஔ ભҠ݅ ঢ়ଶ AWS IoT Core
IoT rule IoT Device (GPS) AWS IoT Events ◦ ॲཧͷྲྀΕྫ GPSσʔλΛৗʹIoT Ruleʹૹ৴ ↓ ൣғ͔ભҠ݅ͰνΣοΫ ↓ ݅ద߹ʂΞΫγϣϯ࣮ߦ ↓ ঢ়ଶભҠ
19 IoT Events ͷྲྀΕΛͬ͘͟Γղઆ ։࢝Ґஔ ભҠ݅ ঢ়ଶ AWS IoT Core
IoT rule IoT Device (GPS) AWS IoT Events ◦ ॲཧͷྲྀΕྫ GPSσʔλΛৗʹIoT Ruleʹૹ৴ ↓ ൣғ͔ભҠ݅ͰνΣοΫ ↓ ݅ద߹ʂΞΫγϣϯ࣮ߦ ↓ ঢ়ଶભҠ ͜ΜͳॲཧΛGUIͰ࡞ΕΔʂ ʢίʔυͰॻ͘͜ͱՄೳʣ
20 ֓ཁ • IoT Events ͱԿ͕Ͱ͖ΔαʔϏεͳͷ͔ʁ • IoT Events ͷར
• IoT Events ͱͦͷଞαʔϏεͱͷൺֱ
21 IoT αʔϏεͷಛੑ • σόΠε͕σʔλૹ৴ػೳ͚ͩͷ߹ଟ͍ • Ϋϥυଆ͔Β͢ΔͱΠϕϯτ͝ͱʹσʔλૹ৴ͯ͠ཉ͍͕͠ਨΕྲྀ͕͠ଟ͍ ΅͕͔͘Μ͕͍͖͑ͨ͞ΐ͏ͷIoTσόΠε Α͋͘ΔIoTσόΠε IoT
Device AWS IoT Core AWS Cloud Ξϥʔτൃੜʂ IoT Device AWS IoT Core AWS Cloud Թ:20 Թ:22 Թ:40 ٸʹԹมΘͬͨͳ Ξϥʔτʂʂ
22 IoT αʔϏεͷಛੑ • σόΠε͕σʔλऩूػೳ͚ͩͷ߹ଟ͍ • Ϋϥυଆ͔Β͢ΔͱΠϕϯτ͝ͱʹσʔλૹ৴ͯ͠ཉ͍͕͠ਨΕྲྀ͕͠ଟ͍ ΅͕͔͘Μ͕͍͖͑ͨ͞ΐ͏ͷIoTσόΠε Α͋͘ΔIoTσόΠε IoT
Device AWS IoT Core AWS Cloud Ξϥʔτൃੜʂ IoT Device AWS IoT Core AWS Cloud Թ:20 Թ:22 Թ:40 IoT Greengrass ͕͋ΕͰ͖ͦ͏ ͨͩσόΠεͷ੍͕…
23 IoT αʔϏεͷಛੑ • σόΠε͕σʔλऩूػೳ͚ͩͷ߹ଟ͍ • Ϋϥυଆ͔Β͢ΔͱΠϕϯτ͝ͱʹσʔλૹ৴ͯ͠ཉ͍͕͠ਨΕྲྀ͕͠ଟ͍ ΅͕͔͘Μ͕͍͖͑ͨ͞ΐ͏ͷIoTσόΠε Α͋͘ΔIoTσόΠε IoT
Device AWS IoT Core AWS Cloud Ξϥʔτൃੜʂ IoT Device AWS IoT Core AWS Cloud Թ:20 Թ:22 Թ:40 IoT EventsӈͷσόΠεͷ࣌ɺγϯϓϧʹঢ়ଶཧΛ࣮ݱͰ͖Δʂ
24 IoT Events ͕ͳ͍߹ͷઃܭྫ • ͏গ͠ৄࡉʹղઆ IoT Device (Թηϯαʔ) AWS
IoT Core AWS Cloud Թ:20 Թ:22 Թ:40 IoT rule AWS Lambda Amazon DynamoDB • ԹΛอଘ • ૹ৴͞ΕͨԹͱ લͷԹΛൺֱ • Թ͕ٸͳมԽͰ ΞϥʔτΛൃ๒ ΤϯυϙΠϯτ ঢ়ଶݕ ঢ়ଶอ࣋ AWS Lambda ΞΫγϣϯ Amazon SNS etc…
25 IoT Events ͕͋Δ߹ͷઃܭྫ • ͏গ͠ৄࡉʹղઆ IoT Device (Թηϯαʔ) AWS
IoT Core AWS Cloud Թ:20 Թ:22 Թ:40 IoT rule • ૹ৴͞ΕͨԹͱ લͷԹΛൺֱ • Թ͕ٸͳมԽͰ ΞϥʔτΛൃ๐ • ԹΛ෦ʹอଘ ΤϯυϙΠϯτ ঢ়ଶݕ ঢ়ଶอ࣋ AWS IoT Events AWS Lambda ΞΫγϣϯ Amazon SNS etc…
26 ઃܭ͕࣮ʹͳΔʢIaC ʹࠐՄ!ʣ ઃܭ࣮ͷΈ͔ผ్هࡌ͕ඞཁ IoT Events ͕ͳ͍߹ IoT Events ͕͋Δ߹
{ "detectorModelDefinition": { "states": [ { "stateName": "inBoundary", "onInput": { "events": [], "transitionEvents": [ JSON Export ઃܭอक͍͢͠
27 ֓ཁ • IoT Events ͱԿ͕Ͱ͖ΔαʔϏεͳͷ͔ʁ • IoT Events ͷར
• IoT Events ͱͦͷଞαʔϏεͱͷൺֱ
Step Functions ͡ΌμϝͳΜʁ ͪΐͬͱͬͯ
ೖྗ͝ͱʹ։࢝εςʔτ͔ΒධՁ 29 ೖྗʹରͯ͠ݱࡏͷεςʔτ͔ΒධՁ Step Functions ͷ߹ IoT Events ͷ߹ AWS
IoT Core IoT rule AWS IoT Core IoT rule … Step Functions ͱͷൺֱ =>ঢ়ଶ͕ଟ͘ͳͬͨ߹ॲཧΛ͏ͷ͕େม => ಛఆͷঢ়ଶͱભҠ͚݅ͩ͑ॲཧ͕͔Δ
ೖྗ͝ͱʹ։࢝εςʔτ͔ΒධՁ 30 ೖྗʹରͯ͠ݱࡏͷεςʔτ͔ΒධՁ Step Functions ͷ߹ IoT Events ͷ߹ AWS
IoT Core IoT rule AWS IoT Core IoT rule … Step Functions ͱͷൺֱ =>ঢ়ଶ͕ଟ͘ͳͬͨ߹ॲཧΛ͏ͷ͕େม => ಛఆͷঢ়ଶͱભҠ͚݅ͩ͑ॲཧ͕͔Δ
31 ྫɽGANTZͷ಄ͷരػثͷ౪ݕΛ࣮͍ͯͩ͘͠͞ ɹɹ=> nҎ্ಛఆͷൣғ֎ʹ͍ͨ߹ঢ়ଶΛมߋ͍ͨ͠ IoT Events ͷ߹ => ҎԼͷΑ͏ʹλΠϚʔΛࠐΜ࣮͕ͩΈ͍͢ AWS
IoT Core IoT rule ①ಛఆͷൣғ͔Βग़ͨ߹ ɹ λΠϚʔελʔτ ②nҎʹൣғʹΕ ɹ λΠϚʔআ ③λΠϚʔ͕nΛա͗Ε ɹ ൣғ֎ͷঢ়ଶʹભҠ GPSσʔλΛৗʹૹ৴ ※IoT Events ͷλΠϚʔ1͕࠷খ୯Ґ 2021/4/18 ࣌ Step Functions ͱͷൺֱ
32 IoT Events ͱ༗ݶΦʔτϚτϯ • IoT Events ༗ݶΦʔτϚτϯͷ࣮ͱ͍͑Δ => ༗ݶΦʔτϚτϯ͕༗ޮͳ߹
IoT Ҏ֎Ͱద༻ՄೳͰ͋Δɻ => Serverless Ͱ͑ΔʢEC2ɺVPCෆཁʣ ɹ Ώ͑ʹ Serverless Automaton ͱݴ͑Δʂ https://ja.wikipedia.org/wiki/༗ݶΦʔτϚτϯ ༗ݶΦʔτϚτϯ IoT Events ͷ σΟςΫλʔϞσϧ
33 ϋʔτϏʔτࢹ => Ұఆ࣌ؒ௨৴ͷͳ͍߹Ξϥʔτ ͷੜ࢈ঢ়گࢹ => nҎ্ಛఆͷσʔλ͕དྷͨ࣌ΞΫγϣϯ࣮ߦ AWS IoT Core
IoT rule https://dev.classmethod.jp/articles/aws-iot-events-heartbeat/ σʔλ͕ج४Λ͑ͨΒ λΠϚʔελʔτ IoT Events ͷԠ༻ྫ Ұఆ࣌ؒج४Λ͑ͨΒ ঢ়ଶมߋ&ΞΫγϣϯ࣮ߦ
34 ·ͱΊ • IoT Events ͱԿ͕Ͱ͖ΔαʔϏεͳͷ͔ʁ => ঢ়ଶʹԠͨ͡ॲཧ͕Մೳ • IoT
Events ͷར => ঢ়ଶݕɺঢ়ଶཧΛDBɺLambdaͳ͠ͰՄೳ • IoT Events ͱͦͷଞαʔϏεͱͷൺֱ => ༗ݶΦʔτϚτϯ͕༗ޮͳ߹ʹ IoT Ҏ֎ͰԠ༻Մೳ ɹ λΠϚʔॲཧ͕؆қʹ࣮Ͱ͖Δ