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
なるべく自動化頑張ったLINE BOT on AWS
Search
pep299
June 24, 2022
Technology
110
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
なるべく自動化頑張ったLINE BOT on AWS
pep299
June 24, 2022
More Decks by pep299
See All by pep299
シークレットを漏らしてしまった話 / secret-key-exposed
pep299
0
81
Playwright for PythonではじめるE2Eテスト / Lets start e2e-test with playwright for python
pep299
0
1.2k
プレイングマネージャーの葛藤 / The Conflict of a Playing Manager
pep299
1
3.4k
will・canマトリクスで自己分析してみた / Self-analysis with will-can matrix
pep299
0
600
そうだ Firebase Remote Config、使おう / let use Firebase Remote Config
pep299
0
100
Other Decks in Technology
See All in Technology
Terraform共通モジュールをチーム横断で“変えられる”運用へ ― リリースと適用の分離
kekke_n
1
3k
オブザーバビリティ、本当に活用できてる? 〜API連携×生成AIで成熟度を自動評価〜
dmmsre
1
3.2k
AIレビューはどこまで任せられるのか?自動化と人が背負うレビューの境界
sansantech
PRO
3
830
SRE Lounge Hiroshimaへの招待
grimoh
0
650
ruby.wasmとPicoRuby.wasmに対応した仮想DOMライブラリを作ってる話 #kaigieffect_kaigi
sue445
PRO
0
150
SRE依存からの脱却 運用を開 発チームへ移す、 フルサイ クル開 発体制の実践
joooee0000
0
2.7k
キャリアの中で本を作る / Making a Book During Your Career
ak1210
0
140
ポストモーテム! DDoSからサイトは守れた。 でもビジネスは守れなかった。
bengo4com
1
3k
AI時代の EM への処方箋
staka121
PRO
0
140
Keeping applications secure by evolving OAuth 2.0 and OpenID Connect
ahus1
PRO
1
160
kintone の AI コワーカーを、 Anthropic にエージェントを"ホストさせて"作った話 #devkinmeetup
sugimomoto
0
110
「ちゃんとやっている」は独りよがりだった ― 不安に寄り添うインシデント対応へ / Towards incident response that addresses anxieties
chmikata
1
5.3k
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Test your architecture with Archunit
thirion
1
2.3k
Thoughts on Productivity
jonyablonski
76
5.2k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.2k
Done Done
chrislema
186
16k
Exploring anti-patterns in Rails
aemeredith
3
440
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
650
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4.1k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Unsuck your backbone
ammeep
672
58k
Paper Plane
katiecoart
PRO
2
52k
Transcript
「なるべく自動化頑張ったLINE BOT on AWS」 ぺぺ@Pep299 1
目次 自己紹介 開発の動機 システムフロー アーキテクチャ 開発・デプロイフロー docs周り 言語・ライブラリ まとめ 2
自己紹介 ぺぺ@Pep299 https://twitter.com/Pep299 情報系学士卒 エンジニア歴7年目 SES(金融系)-> フリーランス -> Web系受託 ->
Web系自社サ Open Source Conference 2021 Kyoto 登壇 東京都 新型コロナウイルス感染症対策サイトのコントリビュート ゲーム(Dead By Daylight、Among Us、ボードゲーム)・ブレイクダンス 3
開発の動機 あるアカウントのTweetを取捨選択して LINEグループに通知したい ノイズをフィルタして有益情報のみ通知 コミュニケーションの発端 Tweetの傾向に合わせてフィルタをちょこちょこ調整したい フィルタ調整以外は自動化したい、デプロイとか CI/CDとかIaC(Infrastructure as Code)周りのキャッチアップ
4
システムフロー 5
アーキテクチャ メール通知 Amazon SNS 定時起動 Amazon EventBridge LINE Group/TalkRoom id
の追加・削除 ログ出⼒ LINE Group/TalkRoom id の取得 メッセージ送信 ツイートの取得 Lambda Amazon S3 エラー通知 Amazon CloudWatch ログ出⼒ Lambda webhook 送信 6
開発・デプロイフロー Renovate Developer GitHub Actions GitHub AWS STS AWS CDK
Amazon S3 AWS CFn AWS System Manager 7
docs周り システムフロー: mermaid.js 8
docs周り アーキテクチャ図: drawio 9
言語・ライブラリ - BOT IaC 言語 Python TypeScript パッケージ管理 poetry npm
静的解析 flake8, mypy black, isort eslint prettier テストランナー pytest jest タスクランナー makefile npm-script 自動テスト LINE, Twitterリクエストはモック AWSリクエストはmotoでモック snapshotテスト 10
まとめ 狙い通りコミュニケーション増えた ちょっとした修正が楽にできる 正直オーバーエンジニアリング Zapier + LINE notify + Twitterとかノーコードで多分できる
11
リンク Repository: https://github.com/pep299/dbd_line_bot 図の修正PR例: https://github.com/pep299/dbd_line_bot/pull/61/files テストコード: https://github.com/pep299/dbd_line_bot/tree/main/app/tests 12