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
61
Pkl/2024-04-17-llt31
ottijp
0
89
JavaScriptのデバッグ/2023-09-04-llt30
ottijp
0
160
CDK for TerraformでAzureリソースをデプロイする/2023-05-15-llt29
ottijp
1
280
TWELITEへの誘い/2022-12-27-llt28
ottijp
0
160
ビルドツールBazelを触ってみた/2022-09-28-llt27
ottijp
0
170
HashiCorp Vaultを使ったシークレットのセキュアな一元管理 〜Ansibleを添えて〜/2022-07-12-llt26
ottijp
0
150
AWSインフラのデプロイをCDKでカイゼンする/2022-03-23-llt25
ottijp
0
92
Amazon Timestreamでデータ補間/2021-12-27-llt24
ottijp
0
110
Other Decks in Programming
See All in Programming
print("Hello, World")
eddie
2
530
The Past, Present, and Future of Enterprise Java with ASF in the Middle
ivargrimstad
0
160
MCPとデザインシステムに立脚したデザインと実装の融合
yukukotani
4
1.4k
知っているようで知らない"rails new"の世界 / The World of "rails new" You Think You Know but Don't
luccafort
PRO
1
180
「手軽で便利」に潜む罠。 Popover API を WCAG 2.2の視点で安全に使うには
taitotnk
0
870
旅行プランAIエージェント開発の裏側
ippo012
2
920
Azure SRE Agentで運用は楽になるのか?
kkamegawa
0
2.4k
Testing Trophyは叫ばない
toms74209200
0
890
プロパティベーステストによるUIテスト: LLMによるプロパティ定義生成でエッジケースを捉える
tetta_pdnt
0
3.3k
Ruby Parser progress report 2025
yui_knk
1
450
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
270
基礎から学ぶ大画面対応(Learning Large-Screen Support from the Ground Up)
tomoya0x00
0
3.2k
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
252
21k
YesSQL, Process and Tooling at Scale
rocio
173
14k
RailsConf 2023
tenderlove
30
1.2k
Navigating Team Friction
lara
189
15k
Gamification - CAS2011
davidbonilla
81
5.4k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
530
Bash Introduction
62gerente
615
210k
Optimizing for Happiness
mojombo
379
70k
Building a Modern Day E-commerce SEO Strategy
aleyda
43
7.6k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
61k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.7k
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