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
Amplify Console のビルド通知をSlackで受け取るためにやったこと
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
youta ogino
July 31, 2020
Programming
5.4k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Amplify Console のビルド通知をSlackで受け取るためにやったこと
2020/07/31 Amplify Meetup#01の登壇内容
youta ogino
July 31, 2020
Transcript
24 slides
Amplify Console のビルド通知を Slackで受け取るためにやったこ と 2020/07/31 Amplify Meetup#01
自己紹介 • 荻野 陽太 • バックエンドエンジニア • 株式会社justInCaseTechnologies(副業) • twitter/github
@youta1119
会社紹介的なやつ 書きたいこと募集 SRE/バックエンド 絶賛募集中!!!
これ、全部Amplify Consoleです
justInCaseにおけるAmplify Console導入状況 • ほぼ全てのプロダクトで導入済み • dev環境だけで10以上のアプリがある • 基本的にアプリはcfnかcdkで管理している
ビルド完了したらSlackに通知を飛ばしたい! ある日ビルド完了したらSlackにビルド結果の通知が欲しいという要望が... → 現状のAmplifyにはそういう機能なかった... amplify.ymlのpostBuild内で通知を送る手もあるがこれだと、ビルドの前に失 敗すると通知送れない...
ビルド完了したらSlackに通知を飛ばしたい! 参考: https://qiita.com/fossamagna/items/70e4e399de59984ad3bb 1.メール通知を設定 2.SNS Topicが出来る 3. Lambdaで購読
ビルド完了したらSlackに通知を飛ばしたい!
None
None
Slackに通知を飛ばせるようになった! ソースコードはこちら https://gist.github.com/youta1119/fc6a6d3b769b2fc54d33db67ba4c4ed5
これでSlackに通知を送れるようになったが... • CloudFormationではメール通知の設定ができない • 手作業でメール通知の設定をしないといけない • SNSのARNは送られてくるメールを見ないとわからないので自動化できな い... 既に10個以上アプリがあるので手動で設定するのはつらい →なんとか自動化したい...
他に何かよい方法がないものか • Amplify ConsoleのIssueに気になるコメントを発見 • https://github.com/aws-amplify/amplify-console/issues/13#issueco mment-603459099 .
他に何かよい方法がないものか 意訳: • Amplifyが作成するEventBridgeのイベントパターンを変更して、すべてのブランチ(過去、現 在、未来)についてメールに通知できるよ。 • EventBridgeのWebコンソールに移動して「 amplify-xxxx-xxxx-branch-notification」の形式を 見つけて、ルールのイベントパターンを編集してね EventBridge…AWS環境で発生するイベントを、
AWSサービスやSaaSのサービスと紐付けることがで きるサービス
None
他に何かよい方法がないものか AmplifyConsoleが自動で作成するEventBridgeのRuleと同じRuleを自分で作 ればビルドイベントが受け取れるのでは? →やってみた
ビルドイベントを受け取るRuleを作ってみる ここにビルドイベントを受け取る 用のイベントパターンを記述
ビルドイベントを受け取るRuleを作ってみる ビルドイベントを受け取りたいアプリのappIdを指定 1. ビルドイベントを受け取りたいアプリのappIdを指定 2. ビルドイベントを受け取りたいブランチを指定(何も指定しな い場合全てのブランチのビルドイベントを受け取れる) 補足)Amplify AppのAppIdは aws
amplify list-appsを実行すれば分かる
ビルドイベントを受け取るRuleを作ってみる 適当なSNSのトピックを指定 SNSに転送するイベントの整形 amplifyが自動で作るinput transformerの設定 をコピペしたものそ設定
Rule作成時の注意点 • DefaultのEventBusに作らないといけない
ビルドイベントを受け取るRuleを作ってみる
Slackに通知の設定を自動化できた!
まとめ Amplify Console のビルド通知をSlackで受け取りたい場合... 1. EventBridgeでAmplifyのビルドイベントを受け取ってSNSに転送するルー ルを作る 2. LambdaでSNSを購読してSlackに通知を送る
最後に • AWSさん、Amplify ConsoleからSlack通知を送れる機能を作ってください
More Decks by youta ogino
See All by youta ogino
【CNDT2020】Amebaアフィリエイト基盤の GKEアーキテクチャと マイクロサービス
youta1119
2
1.4k
KotlinFest2019
youta1119
4
13k
Other Decks in Programming
See All in Programming
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
320
Snowflake Openflow Connector利用の勘所 / 20261024developersio2026tokyo-snowflake-openflow
kasacchiful
PRO
0
330
Performance Optimization With LLMs
xleitix
0
250
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
4
4.2k
現場と育てるRailsモデリング 〜Spreadsheetから始めたモデル設計〜
siroemk
2
1.2k
AI Augmentation Techniques with Liberty
ivargrimstad
1
460
DroidKnights 2026 Android A2UI Jetpack Compose 기반의 안전한 AI UI 렌더링 - 박제창
itsmedreamwalker
1
230
3回つくってわかった、 定期実行ジョブ基盤の本質情報
takai
4
3.9k
ローカルLLMの基本と近況 2611 / Local LLM basics and recent situation 2611
kishida
0
170
Vue.jsで作る空間解析アプリとCapacitorプラグインのData Bridge
hal_spidernight
1
170
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3.2k
Seven New Principles of Software Engineering
yegor256
0
480
Featured
See All Featured
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.8k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
560
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
1k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
570
The Cult of Friendly URLs
andyhume
79
7.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
400
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
470