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
AWS x Alexa対策講座
Search
chao2suke
August 21, 2018
Technology
1
670
AWS x Alexa対策講座
2018/08/21 Alexa Salon SP@東京 資料
chao2suke
August 21, 2018
Tweet
Share
More Decks by chao2suke
See All by chao2suke
天井カメラで捉えた人物をコンピュータビジョンで解析した3年間のトライアンドエラーとこれから
chao2suke
0
2.2k
結局普通のエンジニアが今SageMaker使うと何ができるのかわかるLT
chao2suke
0
1.6k
機械学習の知識ゼロでも動かせるAIツールキットの世界
chao2suke
0
1.6k
「今」のAI技術と「3年後」のAI技術のご紹介
chao2suke
0
1k
Alexaに詳しい人は普段Alexaをどう扱っているか
chao2suke
0
850
奥深きAPLの世界
chao2suke
0
120
Alexaスキル & レジレスCafeにおけるStripe活用の取り組み
chao2suke
0
1.9k
Alexa x 機械学習でスキルをよりリッチにする方法
chao2suke
0
1.6k
#AAJUG vol.2 APL ハンズオン
chao2suke
0
2.7k
Other Decks in Technology
See All in Technology
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
AIチャットボット開発への生成AI活用
ryomrt
0
170
AGIについてChatGPTに聞いてみた
blueb
0
130
The Role of Developer Relations in AI Product Success.
giftojabu1
0
120
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
5
750
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
SREが投資するAIOps ~ペアーズにおけるLLM for Developerへの取り組み~
takumiogawa
1
150
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
150
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
740
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
120
Featured
See All Featured
Designing for Performance
lara
604
68k
Music & Morning Musume
bryan
46
6.2k
Making Projects Easy
brettharned
115
5.9k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Site-Speed That Sticks
csswizardry
0
23
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
27
840
Speed Design
sergeychernyshev
24
610
Docker and Python
trallard
40
3.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
We Have a Design System, Now What?
morganepeng
50
7.2k
Transcript
AWS x Alexa ରࡦߨ࠲ クラスメソッド株式会社 せーの 1
ࣗݾհ ✦ ਗ਼ɹ߶࢙(ͤʔͷ) ✦ ΫϥεϝιουגࣜձࣾࡳຈΦϑΟε AIιϦϡʔγϣϯ෦ AlexaςΫχΧϧΤόϯδΣϦετ VUIΞʔΩςΫτ 2
Agenda ✦ جຊͱͯ͠ԡ͓͑ͯ͘͞αʔϏε ✦ AWS IAM ✦ DynamoDB ✦ Cognito
✦ AlexaͷදݱྗΛิ͏ ✦ AWS IoT ✦ Kinesis Video Stream + Rekognition Video ✦ ӡ༻Λॿ͚Δ ✦ CloudWatch Logs ✦ API Gateway 3
4 AWS IAM
5 AWS IAM ✦ ֤AWS αʔϏεͷ༻ݖݶΛ੍ޚ͢Δ ✦ ʮϢʔβʔʯ͕αʔϏεΛ͑Δ => IAM
User ✦ ʮαʔϏεΛ͑ΔݖݶʯΛ ͍Ζ͍Ζͳͷʹ͚ͭΔ => IAM Role ✦ LambdaͷτϦΨʔ͔Β֬ೝͰ͖Δ
6 AWS IAM
7 AWS IAM
8 AWS IAM
9 DynamoDB
10 DynamoDB ✦ NoSQLܗࣜͷσʔλϕʔεαʔϏε ✦ αʔόʔεϖοΫ༰ྔؾʹ͠ͳͯ͘ྑ͍ ʢϚωʔδυαʔϏε) ✦ ӬଓԽαʔϏεͱͯ͠Alexa-SDKʹσϑΥϧτ Ͱૢ࡞API͕͍͍ͭͯΔ
✦ ॳ৺ऀ͕Ҿ͔͔ͬΔͷʮΩʔʯͱʮϢχοτʯ
11 DynamoDB var alexa = Alexa.handler(event, context); alexa.dynamoDBTableName = 'AlexaUserData_V1';
12 DynamoDB Alexa.SkillBuilders.standard() .addRequestHandlers(LaunchRequestHandler) .withTableName("AlexaUserData_V2") .withAutoCreateTable(true) .lambda();
13 DynamoDB handlerInput.attributesManager.setPersistentAttributes(dynamos) ; await handlerInput.attributesManager.savePersistentAttributes();
14 DynamoDB Ωʔ / ΠϯσοΫεͷ͍͍ͭͯΔItem͕ݕࡧͰ͖Δ
15 DynamoDB ϓϥΠϚϦΩʔ Hash Key Range Key Hash Key OR
16 DynamoDB ηΧϯμϦΠϯσοΫε Hash Key Range Key Hash Key Local
Secondary Index Range Key Global Secondary Index
17 DynamoDB ΩϟύγςΟʔϢχοτ
18 DynamoDB ΩϟύγςΟʔϢχοτ WCU (Write Capacity Unit) RCU (Read Capacity
Unit)
19 DynamoDB ΩϟύγςΟʔϢχοτ WCU (Write Capacity Unit) RCU (Read Capacity
Unit) 1 4KB 1 2 1 1KB 1
20 DynamoDB DynamoDBͷಡΈࠐΈ GetItem BatchGetItem Query Scan
21 DynamoDB
22 DynamoDB ಡΈࠐΈ༰ྔ +
23 DynamoDB
24 Cognito
25 Cognito ✦ AWSͷೝূαʔϏε ✦ Facebook / Google / Amazon
Login / TwitterʹରԠ ✦ ಠࣗͷೝূج൫ʮCognito User Poolʯ Λ࡞Ͱ͖Δ =>AlexaʹखܰͳೝূΛ͚ͭΒΕΔ
26 Cognito Device ID ✦ Device IDεΩϧͷOFF/ONͰมΘΔ ✦ εΩϧԻͰOFF/ON͕Ͱ͖Δ ✦
Alexa݁ߏޡೝࣝ͢Δ ✦ Βͳ͍ؒʹͯ͢ͷDeviceID͕มΘ͍ͬͯΔ ͜ͱ͕͋Δ
27 Cognito https://bit.ly/2whJEZJ
Agenda ✦ جຊͱͯ͠ԡ͓͑ͯ͘͞αʔϏε ✦ AWS IAM ✦ DynamoDB ✦ Cognito
✦ AlexaͷදݱྗΛิ͏ ✦ AWS IoT ✦ Kinesis Video Stream + Rekognition Video ✦ ӡ༻Λॿ͚Δ ✦ CloudWatch Logs ✦ API Gateway 28
29 AWS IoT
30 AWS IoT ✦ AWSͷIoT౷߹αʔϏε ✦ MQTT/HTTPSʹରԠ͠ɺRule Engineʹͯෳ ͷΞΫγϣϯ͕Մೳ ✦
MQTT Over WebSocketͰ WebSocketύΠϓͰMQTT௨৴͕Մೳ
31 AWS IoT ✦ Echo SpotεϚϗ্ͷΧʔυܾΊΒΕͨς ϯϓϨʔτʹը૾ө૾ΛࡌͤΔܗࣜ ✦ Web SocketʹࡌͤΔ͜ͱͰϒϥβ্ͱAlexa
ΛϦΞϧλΠϜ௨৴ͤ͞Δࣄ͕Ͱ͖Δ ✦ IoT SDKΛࡌͤΒΕΔͳΒεϚϗΞϓϦͱ௨৴ ͯ͠ө૾ΛมԽͤ͞Δ͜ͱ
32 AWS IoT
33 Kinesis Video Stream + Rekognition Video
34 Kinesis Video Stream + Rekognition Video ✦ ಈըετϦʔϜαʔϏε &
ੳαʔϏε ✦ AWSʹ҆શʹಈըΛετϦʔϜ͠ɺϦΞϧλΠ Ϝɺόονॲཧ྆ํʹରԠ͢Δ ✦ ಈըΛੳ͠ɺإೝࣝɺإೝূͳͲͷੳ࡞ۀ ͕ߦ͑Δ ✦ ྆αʔϏεσϑΥϧτͰ࿈ܞͰ͖Δ
35 Kinesis Video Stream + Rekognition Video ✦ EchoʹΧϝϥ͕ͳ͍ͨΊɺϊϯόʔόϧί ϛϡχέʔγϣϯ͕શ͘Ͱ͖ͳ͍
✦ ΧϝϥΛ༻ͯ͠ඇಉظʹ࿈ܞͤ͞Δ͜ͱͰ ΓͱΓʹΑΓਓؒຯΛͨͤͨΓɺ༨ܭͳΓ औΓΛলུͨ͠ΓͰ͖Δ ✦ Camera recap APIͱ͍͏ͷग़͖͍ͯͯΔ Alexa
36 Kinesis Video Stream + Rekognition Video K i n
e s i s V i d e o S t r e a m R e k o g n i t i o n V i d e o K i n e s i s D a t a S t r e a m S t r e a m P r o c e s s o r
Agenda ✦ جຊͱͯ͠ԡ͓͑ͯ͘͞αʔϏε ✦ AWS IAM ✦ DynamoDB ✦ Cognito
✦ AlexaͷදݱྗΛิ͏ ✦ AWS IoT ✦ Kinesis Video Stream + Rekognition Video ✦ ӡ༻Λॿ͚Δ ✦ CloudWatch Logs ✦ API Gateway 37
38 Cloud Watch Logs
39 CloudWatch Logs ✦ AWSͷϩάαʔϏε ✦ ࠷େ10·Ͱͷϩάอ͕Մೳ ✦ ϑΟϧλΛ͔͚ͯɺಛఆͷϩάΛநग़Ͱ͖Δ ✦
αϒεΫϦϓγϣϯϑΟϧλͰɺநग़ ͨ͠ϩάʹϦΞϧλΠϜͰॲཧΛૹΔ͜ͱ͕Ͱ ͖Δ
40 CloudWatch Logs
41 CloudWatch Logs
42 API Gateway
43 API Gateway ✦ AWSͷAPIαʔϏε ✦ खܰʹAPIΤϯυϙΠϯτΛ࡞Ͱ͖Δ ✦ ཪଆʹLambdaSNSͳͲͷAWSαʔϏεΛ ஔͨ͠ΓϓϩΩγͱͯ͠ઃఆͨ͠ΓͰ͖Δ
✦ Account LinkͷϓϩΩγͱͯ͠ஔ͢Δ͜ͱͰ OAuth2ଓͷ༰ΛϩΪϯά͢Δ͜ͱ͕Ͱ͖Δ
44 API Gateway
45 API Gateway
46 API Gateway https://bit.ly/2BuUZvl
47 ·ͱΊ ✦ AlexaͷཪଆLambdaͰ͋Δ͜ͱ͕ଟ͘ɺAWS αʔϏεͱͷੑ͕ߴ͍ ✦ ͳΔ͘AWSαʔϏεͰࡁ·͓ͤͯ͘ͱࠔͬͨͱ ͖ʹϥΫ ✦ AlexaεΩϧΛެ։͢ΔͱAWSΫϨδοτ͕Β͑
ΔͷͰɺେମແྉͰ࡞ΕΔ ✦ ࠔͬͨ࣌Developers.IOΛݟͯΈΑ͏