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
680
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
860
奥深き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
PaaSの歴史と、 アプリケーションプラットフォームのこれから
jacopen
7
1.5k
2025年のARグラスの潮流
kotauchisunsun
0
790
.NET AspireでAzure Functionsやクラウドリソースを統合する
tsubakimoto_s
0
190
Accessibility Inspectorを活用した アプリのアクセシビリティ向上方法
hinakko
0
180
re:Invent2024 KeynoteのAmazon Q Developer考察
yusukeshimizu
1
150
Docker Desktop で Docker を始めよう
zembutsu
PRO
0
170
AWS re:Invent 2024 re:Cap Taipei (for Developer): New Launches that facilitate Developer Workflow and Continuous Innovation
dwchiang
0
160
2025年に挑戦したいこと
molmolken
0
160
Oracle Base Database Service:サービス概要のご紹介
oracle4engineer
PRO
1
16k
30分でわかる「リスクから学ぶKubernetesコンテナセキュリティ」/30min-k8s-container-sec
mochizuki875
3
450
AWSの生成AIサービス Amazon Bedrock入門!(2025年1月版)
minorun365
PRO
7
470
20250116_JAWS_Osaka
takuyay0ne
2
200
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
348
20k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Visualization
eitanlees
146
15k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
960
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Being A Developer After 40
akosma
89
590k
Java REST API Framework Comparison - PWX 2021
mraible
28
8.3k
The Power of CSS Pseudo Elements
geoffreycrofte
74
5.4k
The Cult of Friendly URLs
andyhume
78
6.1k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Git: the NoSQL Database
bkeepers
PRO
427
64k
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ΛݟͯΈΑ͏