Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
社内勉強会資料(2016/05/16)
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
tom_furu
May 20, 2016
Technology
1.5k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
社内勉強会資料(2016/05/16)
毎週やっている社内技術勉強会で使った資料です。
公開できない内容もあったので端折ったりマスクしたりしてます。
tom_furu
May 20, 2016
More Decks by tom_furu
See All by tom_furu
Collaboration Hack Meetup!! 登壇資料
tom_furu
0
1.1k
最新AWS活用事例LT大会!(ビール付き) 登壇資料 #loco_meetup_night
tom_furu
0
930
旅と技術のつながりを語る会 登壇資料 #travel_engineer
tom_furu
0
1.8k
IVS CTO NightのLTで使った資料 #ctonight
tom_furu
0
250
DevOps勉強会の発表で使った資料 #devops_LT
tom_furu
0
210
Slack x Hubot 勉強会の発表で使った資料 #hubot_LT
tom_furu
1
1.2k
【Loco Partners】Slack×hubotハッカソン0919
tom_furu
0
160
Other Decks in Technology
See All in Technology
freeeにおけるSoftware Factory
freee
PRO
0
540
reInvent2026stby LT00 "Change your life!"
shinichirokawano
1
340
200人の配信コメント、 全部Jevが仕分けます 〜 マサカリガードを作ってみた 〜
katayamatg
1
290
企画を Software Factory-ready にする——開発が高速になったとき、PdMの仕事はどう変わったか
yachibit
1
280
Vue.jsのGitHubから学ぶ意思決定
yut0naga1_fa
1
300
Adversary Infrastructure Hunting101
disconinja
0
160
背中から、背中へ ー 社外コミュニティで学んだ「雑に背中を押す」という恩送り ー / easygoing encouragement and pay forward to community
naitosatoshi
0
330
AIに任せられるFlutterコードベースを作る 〜仕様をコードで表し、ハーネスで守る〜
myohei
1
250
AI時代の開発はウォーターフォールに回帰する? / development-with-ai-back-to-wf
okamototakuyasr2
0
130
Claude Code on Bedrock で統制をかける小ネタ集/claude-code-bedrock-governance-tips
emiki
1
13k
シンプルな設定ファイルで実現する AWS IAM Identity Center の ユーザー管理Terraformフレームワークを公開しました / Simplifying AWS IAM Identity Center User Management: An Open-Source Terraform Framework
yamaguchitk333
1
320
AWS Continuum for Penetration Testing に Deep Dive してみる
asanoharuki
2
1.4k
Featured
See All Featured
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
580
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
Test your architecture with Archunit
thirion
2
2.5k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
940
Build your cross-platform service in a week with App Engine
jlugia
234
19k
Paper Plane (Part 1)
katiecoart
PRO
2
12k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
280
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Transcript
FB Chatbot 2016/05/16 古田
FB Chatbot 作成 Facebook Messengerのbotを作りたい! (こちらはイメージです)
採用理由:運用面&コスト面で有利と判断 デプロイなど別管理にしたく relux本体のリポジトリとは切り離す。 このためだけにサーバを立てるのも勿体ないので Lambdaを利用。 RDSへ接続できるようになったし、せっかくだから Try。 構成 やりとり メッセージ
relux データ API gateway Lambda DynamoDB RDS
VPC AZ-a AZ-c インターネット ゲートウェイ Lambda用に サブネット作成 NAT ゲートウェイ
API gateway
Lambda(設定)
Lambda(FBからの認証) tokenを判別 var verify_token = 'XXXXXXXX'; exports.handler = function(event, context,
callback) { // Webhooks統合を有効にするための処理 if (event.verify_token === verify_token) { console.log('verify_token is correct'); callback(null, parseInt(event.challenge)); } callback(null, 'Error, wrong validation token'); };
Lambda(機能) function classifyMessageType(text) { // AAAですか? if (isAAAText(text)) { return
DATA_TYPE_AAA; } // BBBですか? if (isBBBText(text)) { return DATA_TYPE_BBB; } // CCCですか? if (isCCCText(text)) { return DATA_TYPE_CCC; } // DDDですか? if (isDDDText(text)) { return DATA_TYPE_DDD; } // それ以外ですね return DATA_TYPE_OTHER; } メッセージ種別判断 var aws = require('aws-sdk'); var dynamo = new aws.DynamoDB(); var tableName = "table-name"; function saveMessage(senderId, type, value) { var dynamoRequest = { "TableName" : tableName }; var nowTheTime = new Date(); var nowTheTimeStr = getTimeString(nowTheTime); dynamoRequest.Item = { "sender" : { "N" : String(senderId) }, "date" : { "S" : nowTheTimeStr }, "type" : { "S" : type }, "value" : { "S" : value } }; dynamo.putItem(dynamoRequest, function (err, data) {}); } メッセージ保存
Facebook設定
Facebook設定