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
Amazon EventBridgeを使って簡単なAWS環境の監視システムを構築する #dev...
Search
ynishimura
July 21, 2022
Technology
1
5.2k
Amazon EventBridgeを使って簡単なAWS環境の監視システムを構築する #devio2022
Developers IO 2022のビデオセッションで利用した資料になります
ynishimura
July 21, 2022
Tweet
Share
More Decks by ynishimura
See All by ynishimura
Amazon EventBridgeでできることをまとめてみた #devio2021
ynishimura0922
0
11k
Other Decks in Technology
See All in Technology
Platform Engineering for Software Developers and Architects
syntasso
1
520
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
600
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
190
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
390
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
9
1.1k
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
180
心が動くエンジニアリング ── 私が夢中になる理由
16bitidol
0
100
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
13k
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Music & Morning Musume
bryan
46
6.2k
A Philosophy of Restraint
colly
203
16k
RailsConf 2023
tenderlove
29
900
Writing Fast Ruby
sferik
627
61k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Building Applications with DynamoDB
mza
90
6.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
What's new in Ruby 2.0
geeforr
343
31k
Transcript
"84ࣄۀຊ෦ΦϖϨʔγϣϯ෦ଜ༞ೋ "NB[PO&WFOU#SJEHFΛͬͯ ؆୯ͳ"84ڥͷࢹγεςϜΛߏங͢Δ
ࣗݾհ ଜ༞ೋ "84ࣄۀຊ෦ΦϖϨʔγϣϯ෦ େࡕΦϑΟεࡏ੶ αʔόʔϨεڥߏங όοΫΤϯυ - 2022 APN
ALL AWS Certi fi cations Engineers - 2021 APN AWS Top Engineer/ APN ALL AWS Certi fi cations Engineer - 2020 APN AWS Top Engineers - 2019 APN AWS Top Engineers
"84ڥΛཧ͢Δͱ͖ͷΈ ɾ"84্ͰΤϥʔҟৗ͕͋ͬͨͱ͖௨͍ͨ͠ ɾෳͷΞΧϯτɺϦʔδϣϯΛࢹ͢Δͷ͕େม ɾࢹπʔϧͳΔ͘"84αʔϏεͰࡁ·͍ͤͨ ɾͳΔ͘؆୯ʹࢹ͍ͨ͠ ɾࢹπʔϧͷཧ࠷খʹ͍ͨ͠ EventBridgeͱAPI DestinationΛ͑ɺൺֱత؆୯ʹ ؆қͳࢹγεςϜ͕࡞Εͦ͏
࣍ "NB[PO&WFOU#SJEHFͱ "1*%FTUJOBUJPO "NB[PO&WFOU#SJEHFΛͬͨ"84ڥͷࢹγ εςϜ ࣮ࡍͷ&WFOU#SJEHFͷઃఆը໘ ·ͱΊ
Amazon EventBridgeͱ
"NB[PO&WFOU#SJEHFͱ l"84ɺطଘͷγεςϜɺ·ͨ4BB4ΞϓϦશମͰ ΠϕϯτۦಈܕΞϓϦέʔγϣϯΛେنʹߏங͢Δz ʰΠϕϯτʱΛ༻͍༷ͯʑͳΞϓϦέʔγϣϯΛ؆୯ʹ ଓͰ͖ΔΑ͏ʹ͢ΔϧʔςΟϯάαʔϏε https://aws.amazon.com/jp/eventbridge/
Πϝʔδਤ ಠࣗ"QQ 4BB4 "84αʔϏε Amazon EventBridge Πϕϯτ ϧʔϧ Πϕϯτιʔε
λʔήοτ ϧʔϧ ϧʔϧ 4BB4 "84αʔϏε ผ"84ڥ Πϕϯτόεʴϧʔϧ Πϕϯτ
"NB[PO&WFOU#SJEHFΛར༻ͨ͠ྫ ૄ݁߹ʹϚΠΫϩαʔϏεΛΈཱͯΔ αʔόʔϨεͳϚωʔδυαʔϏεͷͨΊ αʔό४උɾߏஙɾཧ ʢϚϧν";ɺ4-"ˋʣ ૄ݁߹ʹϚΠΫϩαʔϏεΛΈཱͯΔ
"NB[PO&WFOU#SJEHFͷػೳ εέδϡʔϧ࣮ߦػೳ Πϕϯτϧʔϧͷλʔήοτʹ)551ͷΤϯυϙΠϯτ͕ࢦఆՄೳ ΠϕϯτΛผϦʔδϣϯʹࣗಈͰϑΣΠϧΦʔόʔ͢Δػೳ ࡞ͨ͠ΠϕϯτύλʔϯʹҰக͢Δ͔ݕূ͢ΔαϯυϘοΫεػೳ ΞΧϯτؒɺϦʔδϣϯؒͷΠϕϯτసૹػೳ ΠϕϯτߏεΩʔϚΛݕɺཧ͢Δػೳ Πϕϯτه࠶ੜ͢Δػೳ
API Destination
"1*%FTUJOBUJPO ɾҙͷΤϯυϙΠϯτʹ )551ϦΫΤετΛૹ৴ ɾίʔυͷ࣮ෆཁ ɾηΩϡΞʹೝূใཧ ɾݺͼग़͠ϨʔτௐՄೳ https://aws.amazon.com/blogs/compute/using-api-destinations-with-amazon-eventbridge/ ਤͷҾ༻ݩ
"1*%FTUJOBUJPOͷར༻ྫ ྫɿ4MBDLͱͷ࿈ܞ ػೳΛΘͳ͍ͱ͖ɿ-BNCEBΛར༻
"1*%FTUJOBUJPOͷར༻ྫ ྫɿ4MBDLͱͷ࿈ܞ ஔ͖͑Δ͜ͱͰ࣮ෆཁɺηΩϡΞʹೝূใཧ
ͬͯΈͨϒϩάͷհ https://dev.classmethod.jp/articles/event-bridge-api- destinations-with-slack/
Amazon EventBridgeΛͬͨ AWSڥͷࢹγεςϜ
"NB[PO&WFOU#SJEHFΛͬͨ"84ڥͷࢹγεςϜ ࢹ͍ͨ͠ΠϕϯτΛू͠4MBDL௨
"NB[PO&WFOU#SJEHFΛͬͨ"84ڥͷࢹγεςϜ ࢹ͍ͨ͠ΠϕϯτΛू͠4MBDL௨
"NB[PO&WFOU#SJEHFΛͬͨ"84ڥͷࢹγεςϜ ࢹ͍ͨ͠ΠϕϯτΛू͠4MBDL௨
"NB[PO&WFOU#SJEHFΛͬͨ"84ڥͷࢹγεςϜ ࢹ͍ͨ͠ΠϕϯτΛू͠4MBDL௨
ϝϦοτ 4MBDL௨ػೳΛ"84αʔϏεʹ·͔ͤΔ͜ͱ͕Ͱ͖࣮͕ݮΔ $MPVE8BUDI"MBSN"NB[PO4/4ͷઃఆෆཁ ෳͷΞΧϯτ Ϧʔδϣϯͷࢹ͕༰қ ཧίετ͕͍ʢγεςϜόʔδϣϯΞοϓɺεέʔϧཧෆཁʣ ϥΠηϯεཧෆཁ άϩʔόϧΤϯυϙΠϯτͱ͍͏Մ༻ੑΛߴΊΔػೳ͕͋Δ ʑɺػೳՃ͞ΕΔ
σϝϦοτ $MPVE5SBJM"1*Ҏ֎ͷΠϕϯτʹରԠ͍ͯ͠ΔαʔϏε͕·ͩগ ͳ͘ɺࢹ͍ͨ͠Πϕϯτ͕ະରԠͷͱ͖-BNCEBͰ࡞ΓࠐΈ͕ ඞཁʹͳΔ "84ڥݶఆͷࢹ 4MBDL͔Β"84ڥΛૢ࡞͢Δ͜ͱ͕Ͱ͖ͳ͍ ෳࡶͳཁ݅ຬͨͤͳ͍Մೳੑ͕͋Δ https://docs.aws.amazon.com/ja_jp/eventbridge/latest/userguide/eb-service-event.html
࣮ࡍͷEventBridgeͷઃఆը໘
࣮ࡍͷ&WFOU#SJEHFͷઃఆը໘ ࢹରɿ4UFQ'VODUJPOTͷεςʔτϚγϯͷεςʔλε ཁ݅ɿΤϥʔ࣌ʹ4MBDL௨͍ͤͨ͞ લఏɿ ɹඞࣦͣഊ͢ΔεςʔτϚγϯΛ༻ҙ ɹ4MBDLଆͷઃఆ͍ྃͯ͠Δ
"NB[PO&WFOU#SJEHFͷઃఆ ϧʔϧ࡞ λʔήοτͷࢦఆ
ϧʔϧ࡞ ໊લΛઃఆ Πϕϯτόε ʮEFGBVMUʯΛ༻ ϧʔϧλΠϓʮΠϕϯτ ύλʔϯΛ࣋ͭϧʔϧʯ
ϧʔϧ࡞ ʮ"84ͷαʔϏεʯࢦఆ ʮ4UFQ'VODUJPOTʯΛબ ΠϕϯτλΠϓʮ4UFQ'VODUJPOT &YFDVUJPO4UBUVT$IBOHFʯΛબ ಛఆͷεςʔλεͰʮ'"*-&%ʯ ʮ5*.&%@065ʯΛબ
ϧʔϧ࡞ ʮ"84ͷαʔϏεʯࢦఆ ʮ4UFQ'VODUJPOTʯΛબ ΠϕϯτλΠϓʮ4UFQ'VODUJPOT &YFDVUJPO4UBUVT$IBOHFʯΛબ ಛఆͷεςʔλεͰʮ'"*-&%ʯ ʮ5*.&%@065ʯΛબ
λʔήοτͷࢦఆ ʮ&WFOU#SJEHF"1*ͷѼઌʯΛ બ ৽͍͠"1*ૹ৴ઌΛ࡞
λʔήοτͷࢦఆ "1*ૹ৴ઌΤϯυϙΠϯτ )551ϝιουʮ1045ʯΛબ https://slack.com/api/chat.postMessage
λʔήοτͷࢦఆ ʮ৽͍͠ଓΛ࡞ʯΛબ ଓ໊ೖྗ ૹ৴ઌλΠϓʮͦͷଞʯΛબ
λʔήοτͷࢦఆ ೝূλΠϓʮ"1*ΩʔʯΛબ "1*Ωʔ໊ɺΛೖྗ ৽͍͠ϩʔϧΛ࡞
λʔήοτͷࢦఆ ʮೖྗτϥϯεϑΥʔϚʔʯΛબ
λʔήοτͷࢦఆ ೖྗύε \lEFUBJMzEFUBJM^ 4MBDL௨ͷͨΊͷ࠷ݶͷϖΠϩʔυ { "channel":"νϟϯωϧID", "text":"ߘ͢Δϝοηʔδ" }
λʔήοτͷࢦఆ ςϯϓϨʔτ { "channel":"νϟϯωϧID", "text":<detail> }
௨༰ Πϕϯτใ͕௨ τϥϯεϑΥʔϚʔΛɹɹ ΧελϚΠζ͢Δ͜ͱͰݟ ͘͢͢Δ͜ͱՄೳ
ผϦʔδϣϯͷ&WFOU#SJEHFͷઃఆ
·ͱΊ "NB[PO&WFOU#SJEHFΛ͏͜ͱͰ؆୯ʹࢹγεςϜΛߏஙՄೳ ɾ"1*%FTUJOBUJPOΛར༻͢Δ͜ͱͰ࣮ͳ͠Ͱ4MBDL௨Մೳ ɾ$MPVE8BUDI"MBSN"NB[PO4/4ͷઃఆෆཁ ɾෳΞΧϯτɺෳϦʔδϣϯͷࢹՄೳ ɾϚωʔδυαʔϏεͳͷͰཧίετ͕͍ ɾϥΠηϯεཧෆཁ ɾະରԠͷΠϕϯτଟ͋͘ΔͨΊɺࢹ͍ͨ͠Πϕϯτʹ͍ͭͯཁ֬ೝ
None