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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
More Decks by youta ogino
See All by youta ogino
【CNDT2020】Amebaアフィリエイト基盤の GKEアーキテクチャと マイクロサービス
youta1119
2
1.3k
KotlinFest2019
youta1119
4
13k
Other Decks in Programming
See All in Programming
Unity6 URPによる海底をテーマにしたVJシステムの解説 | Unity Shader 完全に理解した 勉強会
gam0022
0
300
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
6k
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
190
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
33
14k
Are APIs Still Relevant in the AI Era?
soyuka
0
400
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
SREの越境 / SRE Collaboration
y0hgi
2
290
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
130
MVNOの申込からeSIM開通までをiOSアプリでつなぐ- 本人確認・MNP・通信事業者基盤をまたぐ実装
satotakeshi
0
520
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.3k
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.3k
APNsからLive Activityを開始する話
yumnumm
0
150
Featured
See All Featured
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
590
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Building Applications with DynamoDB
mza
96
7.2k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
860
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
260
Paper Plane
katiecoart
PRO
4
53k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
56
3.5k
Code Review Best Practice
trishagee
74
20k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
sira's awesome portfolio website redesign presentation
elsirapls
0
440
Transcript
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通知を送れる機能を作ってください