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 IoTエンタープライズボタンで お手軽イベントトリガ
Search
Satoshi SAKAO
June 02, 2018
Programming
1
410
AWS IoTエンタープライズボタンで お手軽イベントトリガ
2018-06-02 ゆるゆるIT勉強会 feat.Reedex Vol.3 で発表したスライドです.
Satoshi SAKAO
June 02, 2018
Tweet
Share
More Decks by Satoshi SAKAO
See All by Satoshi SAKAO
Testcontainers/2024-11-20-llt32
ottijp
0
54
Pkl/2024-04-17-llt31
ottijp
0
81
JavaScriptのデバッグ/2023-09-04-llt30
ottijp
0
150
CDK for TerraformでAzureリソースをデプロイする/2023-05-15-llt29
ottijp
1
260
TWELITEへの誘い/2022-12-27-llt28
ottijp
0
150
ビルドツールBazelを触ってみた/2022-09-28-llt27
ottijp
0
160
HashiCorp Vaultを使ったシークレットのセキュアな一元管理 〜Ansibleを添えて〜/2022-07-12-llt26
ottijp
0
140
AWSインフラのデプロイをCDKでカイゼンする/2022-03-23-llt25
ottijp
0
86
Amazon Timestreamでデータ補間/2021-12-27-llt24
ottijp
0
100
Other Decks in Programming
See All in Programming
Modern Angular with Signals and Signal Store:New Rules for Your Architecture @enterJS Advanced Angular Day 2025
manfredsteyer
PRO
0
220
技術同人誌をMCP Serverにしてみた
74th
1
640
Rails Frontend Evolution: It Was a Setup All Along
skryukov
0
140
ruby.wasmで多人数リアルタイム通信ゲームを作ろう
lnit
3
470
Discover Metal 4
rei315
2
130
Quand Symfony, ApiPlatform, OpenAI et LangChain s'allient pour exploiter vos PDF : de la théorie à la production…
ahmedbhs123
0
190
5つのアンチパターンから学ぶLT設計
narihara
1
170
AI コーディングエージェントの時代へ:JetBrains が描く開発の未来
masaruhr
1
140
ソフトウェア品質を数字で捉える技術。事業成長を支えるシステム品質の マネジメント
takuya542
1
13k
Goで作る、開発・CI環境
sin392
0
230
10 Costly Database Performance Mistakes (And How To Fix Them)
andyatkinson
0
330
PicoRuby on Rails
makicamel
2
130
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
31
1.3k
Rebuilding a faster, lazier Slack
samanthasiow
82
9.1k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
6
300
Designing for humans not robots
tammielis
253
25k
How to train your dragon (web standard)
notwaldorf
95
6.1k
Being A Developer After 40
akosma
90
590k
GraphQLとの向き合い方2022年版
quramy
49
14k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.9k
The Cost Of JavaScript in 2023
addyosmani
51
8.5k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
Transcript
AWS IoTエンタープライズボタンで お手軽イベントトリガ ゆるゆるIT勉強会 feat.Reedex Vol.3 2018/06/02 (Sat) Satoshi SAKAO
(@ottijp) Y1
Who Y2 インフォコム株式会社 オープンイノベーションセンター " アプリケーションエンジニア JS(ES6) / Node.js /
GCP / IoT / iOS (Swift) ネコ / テニス @ottijp Satoshi SAKAO
Y3 最近意識していること
Y4 ◦◦を解決 するために ◦◦やってみた・使ってみた ⇨ Problem driven Trial Problem
Y5 今回の題材( ) Problem
Y6 オフィスにおける庶務遠すぎ問題 庶務 ボス 書類 polling
Y7 オフィスにおける庶務遠すぎ問題 庶務 ボス 書類 push
Y8 庶務遠すぎ問題 を解決するために AWS IoTエンタープライズボタン使ってみた
Y9 AWS IoT Enterprise Button (エンプラボタン) 2018年5月 発売!
Y10 Amazon Dash エンプラボタン
Y11 自前の Lambda起動 エンプラボタン Amazon Dash Amazon AWS 1-click 特定商品の
発注
Y12 エンプラボタンのセットアップは簡単!
セットアップ手順 • Lambdaファンクションを作る • メール・SMS送信の場合は不要 • AWS 1-Clickアプリでエンプラボタンのセットアップ • Wi-Fi設定
• アクション(SMS・メール・Lambda)の設定 • プレイスメントの設定 • おわり Y13 1-Click
作ったLambdaファンクション Y14 1 const request = require('request') 2 3 exports.handler
= async (event) => { 4 const batteryLife = event.deviceInfo.remainingLife 5 6 const options = { 7 url: process.env.SLACK_URL, 8 headers: { 9 'Content-Type':'application/json' 10 }, 11 json: { 12 channel: process.env.SLACK_CHANNEL, 13 text: `書類投函ボタンが押されました!(バッテリ残量: ${batteryLife}%)`, 14 username: '書類箱', 15 icon_emoji: ':inbox_tray:', 16 }, 17 } 18 19 return new Promise((resolve, reject) => { 20 request.post(options, (error, response, body) => { 21 if (error) { reject(error) } 22 else { 23 resolve({ 24 statusCode: response.statusCode, 25 body, 26 }) 27 } 28 }) 29 }) 30 } Slackに通知するだけ
設置したエンプラボタン Y15
Y16 ポチっ!!
Lambdaに送られるイベント情報 Y17 1 { 2 "deviceInfo": { 3 "deviceId": "xxxxxxxxxxxxxx4T",
4 "type": "button", 5 "remainingLife": 99.8, 6 "attributes": { 7 "projectRegion": "ap-northeast-1", 8 "projectName": "doc-notifier", 9 "placementName": "team-doc-inbox", 10 "deviceTemplateName": "notify" 11 } 12 }, 13 "deviceEvent": { 14 "buttonClicked": { 15 "clickType": "SINGLE", 16 "reportedTime": "2018-05-20T12:22:40.028Z" 17 } 18 }, 19 "placementInfo": { 20 "projectName": "doc-notifier", 21 "placementName": "team-doc-inbox", 22 "attributes": { 23 24 }, 25 "devices": { 26 "notify": “xxxxxxxxxxxxxx4T" 27 } 28 } 29 } デバイス情報 クリックイベント SINGLE/DOUBLE/LONG プレイスメント
話したこと • Problem driven Trialのススメ • AWS IoT Enterprise Buttonは超お手軽
Y18
$ exit Y19
Y20 Appendix
AWS 1-Click • 物理世界から簡単にLambdaファンクションを起動するサービス • AWS IoT Coreの認証や暗号化周りなどを一括してやってくれ るようなサービス •
デバイス・プロジェクト設定とレポート機能 • 今ある対応デバイス • AWS IoTエンタープライズボタン(Wi-Fi) • AT&T LTE-M Button(LTE) Y21 AT&T LTE-M Button
AWS 1-Click Y22
AWS 1-Clickアプリ Y23
AWS 1-Clickアプリ Y24