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
Serverless Slack bot
Search
lielran
February 27, 2017
Technology
1
250
Serverless Slack bot
Serverless slack bot @Hibob
lielran
February 27, 2017
Tweet
Share
More Decks by lielran
See All by lielran
aws-sageMaker
lielran
0
12
All-In-On-Serverless
lielran
1
43
the future of development environment
lielran
0
30
Other Decks in Technology
See All in Technology
長期間TiDBを使ってきた話 @ 私たちはなぜNewSQLを使うのかTiDB選定5社が語る選定理由と活用LT / Experiences with TiDB Over Time
chibiegg
2
900
Reducing Cross-Zone Egress at Spotify with Custom gRPC Load Balancing Recap
koh_naga
0
210
ワールドカフェI /チューターを改良する / World Café I and Improving the Tutors
ks91
PRO
0
120
現代CSSフレームワークの内部実装とその仕組み
poteboy
7
3.6k
GraphQL 成熟度モデルの紹介と、プロダクトに当てはめた事例 / GraphQL maturity model
mh4gf
7
1.3k
FrontDoorとWebAppsを組み合わせた際のリダイレクト処理の注意点
kenichirokimura
1
530
KubeConにproposalを送りたい人へのアドバイス
sat
PRO
3
260
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
2.1k
Azureの基本的な権限管理の勉強会
yhana
0
590
レガシーをぶっ壊せ。AEONで始めるDevRelの話 / Qiita Night 2024-2-22
aeonpeople
3
1.3k
地理空間データ可視化・解析・活用ソリューション Pacific Spatial Solutions (PSS)
pacificspatialsolutions
0
290
Postman v10リリース後を振り返る / Looking back at Postman v10 after release
yokawasa
1
160
Featured
See All Featured
Web development in the modern age
philhawksworth
202
10k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
274
13k
Designing for humans not robots
tammielis
248
25k
Six Lessons from altMBA
skipperchong
21
3k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
Code Review Best Practice
trishagee
55
15k
Designing Experiences People Love
moore
136
23k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
Building Better People: How to give real-time feedback that sticks.
wjessup
355
18k
Optimizing for Happiness
mojombo
370
69k
The Pragmatic Product Professional
lauravandoore
25
5.8k
Thoughts on Productivity
jonyablonski
58
3.8k
Transcript
None
Private & Confidential 2 HIBOB.COM SORTING THE PEOPLE STUFF
Private & Confidential 3 HR Bob in a nutshell Digital
Broker & All in one cloud-based platform for SMEs
Private & Confidential 4 Employee Engagement . Leveraging the platforms
Buying power. Up-selling private insurance. Bob in a nutshell
The mission Slack service @hibob Serverless framework Benefits Challenges The
Agenda
Build a Slack Service Simple setup Fast development Easy to
onboard new team members The Mission
Slack service @hibob
The Serverless framework Cli tool(Nodejs) Cloudformation based Supports multiple regions
Supports multiple Stages per region Can deploy all(function) or only one of them Versioning and Rollback supported. Support environments variables for each environment
Serverless 101 Serverless.yml file (config) Function Handlers (code)
Serverless.yml(config) file service: hello-lambda provider: name: aws runtime: nodejs4.3 #
(Support LTS versions) functions: hello: handler: handler.hello memorySize: 1524 # optional, default is 1024 timeout: 10 # timeout in secs events: - http: #other events: S3, schedule, sns, DynamoDbStream, alexaSkill, IOT path: users/create method: get custom: FOO: BAR resources: … # CloudFormation resource templates
The function • Event - event data to the handler
• Context - runtime information • Callback - optional callback to return information to the caller
The Serverless framework - deployment $ serverless deploy Serverless.yml Zip
Cloudformation update Update Lambda
Other frameworks Apex Aws SAM And many more!
None
Slack - OAuth
Slack - Scopes 1. Webhook - url that you can
post messages to 2. Command - invoke request for data (e.g /giphy ) 3. Bot - read your channel data
Slack Service - OAuth
Slack Service - Webhooks(Cron)
Slack Service - Command
Slack Service - Command
Serverless Slack Service - Benefits Cost effective Fast development Infinite
scale Easy setup Easy onboarding new team members
Pitfalls
Pitfall #1 - Submit request only after long live token
Pitfall #2 - Use Lambda Proxy integration
Pitfall #3 - Node.Js On lambda Aws Lambda support only
LTS version Keep the setup simple - avoid babel/webpack if you can
Challenges Unit / Integration testing Debug Development flow in teams
Service discovery Architecture Communication with other lambdas Cold starts Monitoring/Health checks
Questions?