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
690
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.7k
「今」のAI技術と「3年後」のAI技術のご紹介
chao2suke
0
1.1k
Alexaに詳しい人は普段Alexaをどう扱っているか
chao2suke
0
880
奥深きAPLの世界
chao2suke
0
120
Alexaスキル & レジレスCafeにおけるStripe活用の取り組み
chao2suke
0
2k
Alexa x 機械学習でスキルをよりリッチにする方法
chao2suke
0
1.6k
#AAJUG vol.2 APL ハンズオン
chao2suke
0
2.7k
Other Decks in Technology
See All in Technology
AIエージェント時代のエンジニアになろう #jawsug #jawsdays2025 / 20250301 Agentic AI Engineering
yoshidashingo
8
3.8k
4th place solution Eedi - Mining Misconceptions in Mathematics
rist
0
150
分解して理解する Aspire
nenonaninu
2
1.1k
開発組織を進化させる!AWSで実践するチームトポロジー
iwamot
2
400
事業モメンタムを生み出すプロダクト開発
macchiitaka
0
100
ウォンテッドリーのデータパイプラインを支える ETL のための analytics, rds-exporter / analytics, rds-exporter for ETL to support Wantedly's data pipeline
unblee
0
130
AWS Well-Architected Frameworkで学ぶAmazon ECSのセキュリティ対策
umekou
2
150
株式会社Awarefy(アウェアファイ)会社説明資料 / Awarefy-Company-Deck
awarefy
3
11k
Fraxinus00tw assembly manual
fukumay
0
110
RayでPHPのデバッグをちょっと快適にする
muno92
PRO
0
190
Snowflakeの開発・運用コストをApache Icebergで効率化しよう!~機能と活用例のご紹介~
sagara
1
470
Visualize, Visualize, Visualize and rclone
tomoaki0705
9
83k
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
RailsConf 2023
tenderlove
29
1k
Adopting Sorbet at Scale
ufuk
74
9.2k
Practical Orchestrator
shlominoach
186
10k
Why Our Code Smells
bkeepers
PRO
336
57k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Git: the NoSQL Database
bkeepers
PRO
427
65k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
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ΛݟͯΈΑ͏