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
サーバーレスアーキテクチャでサクッと作るアイマスbot
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Keiichi Nomura
July 06, 2019
Technology
1k
1
Share
サーバーレスアーキテクチャでサクッと作るアイマスbot
Keiichi Nomura
July 06, 2019
More Decks by Keiichi Nomura
See All by Keiichi Nomura
チーム開発のふりかえり2024 #devio2024
k1style
0
380
ECサイト向け決済機能の開発で学んだ外部決済サービスの活用ポイント
k1style
1
2.1k
開発チームリーダーとしてやってきたことのふりかえり
k1style
0
1.5k
【EC/CRM基盤開発】 prismatix事業部 Devチーム(サーバーサイドエンジニア)の紹介 / Prismatix server side engineer job introduction
k1style
0
1.5k
外部決済サービスを利用する上での脆弱ポイントと対策 / Vulnerable points and countermeasures for using external payment services
k1style
0
2k
外部決済サービスを利用した開発の反省と改善 #devio2021 / Introspection and Improvement of Development with External Payment Services
k1style
0
1.8k
Developers.IO 2020 Connect Day5 ECサイトの決済システムを作るなら知っておきたいこと / Developers.IO 2020 Connect Day5 Payment Development Flow With E-commerce Site
k1style
0
4.7k
私が考えるAWSを使ったアイマスHack
k1style
1
1.1k
Other Decks in Technology
See All in Technology
[4] Power BI Deep Dive [2026-05]
ohata_bi
0
100
続 運用改善、不都合な真実 〜 物理制約のない運用改善はほとんど無価値 / 20260518-ssmjp-kaizen-no-value-without-physical-constraints
opelab
2
270
「強制アップデート」か「チームの自律」か?エンタープライズが辿り着いたプラットフォームのハイブリッド運用/cloudnative-kaigi-hybrid-platform-operations
mhrtech
0
220
SpeechTranscriber + AIによる文字起こし機能
kazuki1220
0
120
Oracle AI Database@AWS:サービス概要のご紹介
oracle4engineer
PRO
4
2.6k
TypeScriptで実現する既存APIを活用したリモートMCPサーバー構築 / TSKaigi 2026
soarteclab
0
150
Directions Asia 2026 | Beyond Buildable AI Agents: Let’s Visualize Partner Value in the AI Era
ryoheig0405
0
130
The Bag-of-Documents Model for Query Understanding and Retrieval
dtunkelang
0
180
Purview 勉強会報告 Microsoft Purview 入門しようとしてみた
masakichixo
1
460
Sansan Engineering Unit 紹介資料
sansan33
PRO
1
4.5k
AsyncStreamでマルチブロードキャストを実装する
1mash0
1
180
ワールドカフェ再び、そしてゴール・ルール・ロール・ツール / World Café Revisited, and the Goals-Rules-Roles-Tools
ks91
PRO
0
180
Featured
See All Featured
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
180
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
350
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
240
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Visualization
eitanlees
151
17k
Bash Introduction
62gerente
615
210k
Transcript
サーバーレスアーキテクチャでサクッと 作るアイマスbot 2019/07/06 IM@S Engineer Talks nomura.keiichi(K1)
自己紹介 K1 ( 野村啓一 : nomura.keiichi) @k1_style クラスメソッド株式会社 事業開発部所属 アプリケーションエンジニア(サーバサイド)
Java(Spring Boot, Gradle), AWS 竜宮小町・セクシーギルティ・放課後クライマックスガールズP
今日話すこと サーバーレスアーキテクチャとは AWS SAM で、アイドルがSlack で喋りかけてくれる風bot を試しに作った
サーバーレスアーキテクチャとは
サーバーレスアーキテクチャとは サーバー管理を意識せずアプリケーションやサービスを構築して実 行する手法のこと。 コード実行環境がすぐ利用できる サーバーのOS やミドルウェア等の管理は不要 AWS によるサーバーレスアーキテクチャの解説 https://aws.amazon.com/jp/lambda/serverless-architectures-learn- more/
AWS SAM
AWS SAM AWS のサーバーレスアプリケーション構築用フレームワーク 利用するAWS 環境を定義するテンプレートと、メインロジックと なるプログラムを開発者が用意 SAM で用意されたCLI でテスト・ビルド・デプロイを実施
https://aws.amazon.com/jp/serverless/sam/
サーバーレスアプリケーションに必要な環境の定義をテンプレート に記載
AWS Lambda で動作するロジックを実装
サーバーレスアプリケーションのテスト・ビルド・デプロイをCLI で 実行 sam local invoke --template template.yaml --event "App-event.json"
2019-07-05 22:33:56 Found credentials in environment variables. 2019-07-05 22:33:56 Invoking handler.App (java8) < 中略> {"body":"{ \"message\": \" 次もこの調子でいくわよ!\" }","headers":{"X-Custom-Header"
AWS Toolkit AWS SAM の機能をIDE 上で容易に実行可能にできるIDE プラグイン IntelliJ https://aws.amazon.com/jp/intellij/ eclipse
https://aws.amazon.com/jp/eclipse/ Visual Studio https://aws.amazon.com/jp/visualstudio/
【参考】AWS Toolkit for JetBrains 使ってみたブログ https://dev.classmethod.jp/cloud/aws/aws-toolkit-for-jetbrains-with- java8-gradle/
Slack でアイドルが喋りかけてくれる風bot を試 しに作った
いおりんbot
デモ curl -s https://xxx.execute-api.region.amazonaws.com/Prod/hello/ 用意したエンドポイントを叩くと、Slack でいおりんが発言する
やったこと 1. Slack でBot を用意する 2. AWS Toolkit 導入済みのIntelliJ でAWS
Serverless Application のプロ ジェクト作成 3. Bot のエンドポイント等AWS 環境の定義をtemplate.yaml に記述 4. Bot で動かすプログラムとユニットテストを書く 5. AWS Toolkit 使ってデプロイ
ソースコード https://github.com/K1-Style/imas-slack-iorin-bot 近日中に、README と解説ブログまとめます。
まとめ サーバーレスアーキテクチャの恩恵を活かして、有用なアイマスbot を量産していこう
https://k1-style.net @k1_style