๐Ÿ—จ AWS Chatbot์„ ์‚ฌ์šฉํ•˜์—ฌ Slack ์ฑ„๋„์—์„œ Amazon EventBridge ์ด๋ฒคํŠธ ๋ชจ๋‹ˆํ„ฐ๋ง

์•ˆ๋…•ํ•˜์„ธ์š”! ๋ฒ ์Šคํ•€๊ธ€๋กœ๋ฒŒ ํด๋ผ์šฐ๋“œ ๊ธฐ์ˆ ์ง€์›ํŒ€์ž…๋‹ˆ๋‹ค. ๐Ÿ˜€


์ด๋ฒˆ ์•„ํ‹ฐํด์—์„œ๋Š” AWS Chatbot์„ ์ด์šฉํ•˜์—ฌ Slack ์ฑ„๋„์—์„œ Amazon EventBridge์˜ ์ด๋ฒคํŠธ๋ฅผ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•˜์—ฌ ์†Œ๊ฐœํ•˜๊ณ ์ž ํ•ฉ๋‹ˆ๋‹ค!



Slack ์ฑ„๋„์„ ํ†ตํ•ด ์•Œ๋ฆผ์„ ๋ฐ›๋Š” ๊ณผ์ •์€ ์•„๋ž˜์™€ ๊ฐ™์Šต๋‹ˆ๋‹ค.

  • EventBridge โ†’ SNS topic โ†’ AWS Chatbot โ†’ Slack


์•„๋ž˜๋Š” ์ œ๊ฐ€ ํ…Œ์ŠคํŠธ๋ฅผ ์ง„ํ–‰ํ•˜๋ฉด์„œ ์ฐธ๊ณ ํ•˜์˜€๋˜ AWS ๋งํฌ์ž…๋‹ˆ๋‹ค ๐Ÿ™‚

ํ•ด๋‹น ๋งํฌ๋Š” ECS ํด๋Ÿฌ์Šคํ„ฐ์˜ ์ด๋ฒคํŠธ ๊ตฌ๋…์— ๋Œ€ํ•œ ๋‚ด์šฉ์ด๋ฉฐ,
์ €๋Š” RDS ์ด๋ฒคํŠธ ๊ตฌ๋…์— ๋Œ€ํ•œ ํ…Œ์ŠคํŠธ๋ฅผ ์ง„ํ–‰์„ ์œ„ํ•ด EventBridge์—์„œ ์ˆ˜์‹ ํ•˜๊ณ ์ž ํ•˜๋Š” ๋ฆฌ์†Œ์Šค ์ด๋ฒคํŠธ๋ฅผ RDS๋กœ ์„ค์ •ํ•˜์˜€์Šต๋‹ˆ๋‹ค!

๐ŸŒ AWS Chatbot์„ ์‚ฌ์šฉํ•˜์—ฌ Slack ์ฑ„๋„์—์„œ Amazon EventBridge ์ด๋ฒคํŠธ ๋ชจ๋‹ˆํ„ฐ๋ง –
https://aws.amazon.com/ko/blogs/mt/monitor-amazon-eventbridge-events-in-your-slack-channels-with-aws-chatbot/



1๋‹จ๊ณ„: Amazon SNS ์ฃผ์ œ ์ƒ์„ฑ

EventBridge์™€ AWS Chatbot์„ ์—ฐ๊ฒฐํ•  SNS ์ฃผ์ œ๋ฅผ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
์ด๋ฏธ SNS ์ฃผ์ œ๊ฐ€ ์žˆ๋Š” ๊ฒฝ์šฐ์—๋Š” ์ด ๋‹จ๊ณ„๋ฅผ ๊ฑด๋„ˆ๋›ธ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

figure 1 – Amazon SNS ์ฃผ์ œ ์ƒ์„ฑ



2๋‹จ๊ณ„: RDS ์ƒํƒœ ๋ณ€๊ฒฝ ์ด๋ฒคํŠธ์— ๋Œ€ํ•œ Amazon EventBridge ๊ทœ์น™ ๊ตฌ์„ฑ

Amazon EventBridge ์ฝ˜์†”์—์„œ ๊ทœ์น™์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.

์ €๋Š” ์ด๋ฒคํŠธ๋ฅผ ์ˆ˜์‹ ํ•  ์„œ๋น„์Šค๋ฅผ Relational Database Service(RDS)๋กœ ์„ ํƒํ•˜์˜€๊ณ , ์ด๋ฒคํŠธ ์œ ํ˜•์„ RDS DB Instance์— ๋Œ€ํ•œ ๋ชจ๋“  ์ด๋ฒคํŠธ๋กœ ์ง€์ •ํ•˜์˜€์Šต๋‹ˆ๋‹ค.

๋งˆ์ง€๋ง‰์œผ๋กœ ์ด๋ฒคํŠธ๊ฐ€ ํŠธ๋ฆฌ๊ฑฐ๋  ๋•Œ ํ˜ธ์ถœํ•  ๋Œ€์ƒ์„ ์œ„์—์„œ ์ƒ์„ฑํ•œ SNS ์ฃผ์ œ “sohyun_chatbot”์œผ๋กœ ์„ค์ •ํ•ฉ๋‹ˆ๋‹ค.

figure 2.1 – Amazon EventBridge ๊ทœ์น™ ์ƒ์„ฑ_์ด๋ฆ„ ๋ฐ ์„ค๋ช…


figure 2.2 – Amazon EventBridge ๊ทœ์น™ ์ƒ์„ฑ_ํŒจํ„ด ์ •์˜


figure 2.3 – Amazon EventBridge ๊ทœ์น™ ์ƒ์„ฑ_์ด๋ฒคํŠธ ๋ฒ„์Šค ์„ ํƒ ๋ฐ ๋Œ€์ƒ ์„ ํƒ



3๋‹จ๊ณ„: AWS Chatbot ๊ตฌ์„ฑ ์ƒ์„ฑ

์ด์ œ ์ฑ„ํŒ… ํด๋ผ์ด์–ธํŠธ๋กœ AWS Chatbot์„ ๊ตฌ์„ฑํ•ฉ๋‹ˆ๋‹ค.

AWS Chatbot ์ฝ˜์†”์— ์ ‘์†ํ•˜์—ฌ “์ƒˆ ํด๋ผ์ด์–ธํŠธ ๊ตฌ์„ฑ”์„ ์„ ํƒํ•˜๊ณ , ์•„๋ž˜์™€ ๊ฐ™์ด ํด๋ผ์ด์–ธํŠธ ์œ ํ˜•์—์„œ Slack์„ ์„ ํƒํ•˜์—ฌ ๊ตฌ์„ฑํ•ฉ๋‹ˆ๋‹ค.

figure 3.1 – AWS Chatbot ์ƒˆ ํด๋ผ์ด์–ธํŠธ ๊ตฌ์„ฑ


๊ทธ๋Ÿฌ๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด AWS Chatbot์ด Slack ์›Œํฌ์ŠคํŽ˜์ด์Šค์— ๋Œ€ํ•œ ์•ก์„ธ์Šค๋ฅผ ์š”์ฒญํ•ฉ๋‹ˆ๋‹ค.

figure 3.2 – AWS Chatbot์—์„œ Slack ์›Œํฌ์ŠคํŽ˜์ด์Šค์— ์•ก์„ธ์Šค ์š”์ฒญ ํ™”๋ฉด


ํ—ˆ์šฉ์„ ํ•˜๊ฒŒ ๋˜๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด Slack ์ฑ„๋„ ๊ตฌ์„ฑ์œผ๋กœ redirection ํ•˜๊ฒŒ ๋ฉ๋‹ˆ๋‹ค.

์•Œ๋ฆผ์„ ๋ฐ›์„ ์ฑ„๋„์„ ์„ ํƒํ•˜๊ณ  drop down ๋ชฉ๋ก์—์„œ ๊ณต๊ฐœ ์ฑ„๋„์„ ์„ ํƒํ•˜๊ฑฐ๋‚˜ ๋น„๊ณต๊ฐœ ์ฑ„๋„์˜ URL ๋˜๋Š” ID๋ฅผ ๋ณต์‚ฌํ•˜์—ฌ ๋ถ™์—ฌ๋„ฃ๊ธฐ ํ•ฉ๋‹ˆ๋‹ค.
(๋น„๊ณต๊ฐœ Slack ์ฑ„๋„์˜ URL์„ ์ฐพ์œผ๋ ค๋ฉด Slack์˜ ์™ผ์ชฝ ์‚ฌ์ด๋“œ ๋ฐ”์—์„œ ์ฑ„๋„ ์ด๋ฆ„์— ๋Œ€ํ•œ ์ปจํ…์ŠคํŠธ ๋ฉ”๋‰ด๋ฅผ ์—ด๊ณ  ๋งํฌ ๋ณต์‚ฌ๋ฅผ ์„ ํƒํ•ฉ๋‹ˆ๋‹ค.)

figure 3.3 – Slack ์ฑ„๋„ ๊ตฌ์„ฑ_์„ธ๋ถ€ ์ •๋ณด ๋ฐ ์ฑ„๋„


figure 3.4 – Slack ์ฑ„๋„ ๊ตฌ์„ฑ_๊ถŒํ•œ


figure 3.5 – Slack ์ฑ„๋„ ๊ตฌ์„ฑ_์•Œ๋ฆผ


โ— AWS Chatbot์€ AWS Chatbot ์•ฑ (@aws)์„ Slack ์ฑ„๋„์— ์ถ”๊ฐ€๋œ ๊ฒฝ์šฐ์—๋งŒ ์ฑ„๋„์—์„œ ์ž‘๋™ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
AWS Chatbot ์•ฑ์ด ์ถ”๊ฐ€๋˜์ง€ ์•Š์€ ๊ฒฝ์šฐ ์ฑ„๋„์˜ ์„ธ๋ถ€ ์ •๋ณด ํŽ˜์ด์ง€์—์„œ ์•ฑ ์ถ”๊ฐ€๋ฅผ ์„ ํƒํ•˜์—ฌ ์ถ”๊ฐ€ํ•ฉ๋‹ˆ๋‹ค.

figure 3.6 – Slack์—์„œ AWS Chatbot ์•ฑ ์ถ”๊ฐ€



4๋‹จ๊ณ„: RDS DB Instance ์ด๋ฒคํŠธ์— ๋Œ€ํ•œ ์•Œ๋ฆผ ํ…Œ์ŠคํŠธ

RDS DB ์ธ์Šคํ„ด์Šค๋ฅผ ์ˆ˜๋™์œผ๋กœ ์ค‘์ง€ํ•˜์—ฌ ์œ„ ์„ค์ •์„ ํ…Œ์ŠคํŠธํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
๊ทธ๋Ÿฌ๋ฉด ์•„๋ž˜์™€ ๊ฐ™์ด ์•Œ๋ฆผ์ด ํŠธ๋ฆฌ๊ฑฐ๋˜๊ณ  Slack ์ฑ„๋„์— ์•Œ๋ฆผ์ด ์ „์†ก๋ฉ๋‹ˆ๋‹ค! ๐Ÿ˜‰

figure 4 – Slack์—์„œ RDS DB Instance ์ด๋ฒคํŠธ์— ๋Œ€ํ•œ ์•Œ๋ฆผ ์ˆ˜์‹ 



์ด๋ ‡๊ฒŒ ํ•ด์„œ AWS Chatbot์„ ์ด์šฉํ•˜์—ฌ Slack ์ฑ„๋„์—์„œ Amazon EventBridge์˜ ์ด๋ฒคํŠธ๋ฅผ ๋ชจ๋‹ˆํ„ฐ๋งํ•˜๋Š” ๋ฐฉ๋ฒ•์— ๋Œ€ํ•ด ์•Œ์•„๋ณด์•˜์Šต๋‹ˆ๋‹ค! ๐Ÿ˜‰

AWS Chatbot ๊ตฌ์„ฑ ์ฑ„ํŒ… ์ฑ„๋„์—์„œ ํ™•์žฅ๋œ ๋ฒ”์œ„์˜ AWS ์„œ๋น„์Šค๋ฅผ ์กฐ๊ธˆ ๋” ์‰ฝ๊ฒŒ ๋ชจ๋‹ˆํ„ฐ๋งํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค. Slack ๋ฐ Chime๊ณผ์˜ ์ด๋Ÿฌํ•œ integration์€ ์ปจํ…์ŠคํŠธ ์ „ํ™˜์„ ์ค„์ด๊ณ  ์ฑ„ํŒ… ์ฑ„๋„์—์„œ ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜ ๋ฐ CI/CD ์›Œํฌํ”Œ๋กœ์šฐ๋ฅผ ๋ชจ๋‹ˆํ„ฐ๋งํ•  ์ˆ˜ ์žˆ๋Š” ๊ธฐํšŒ๋ฅผ ์ œ๊ณตํ•ฉ๋‹ˆ๋‹ค!

์ง์ ‘ ๊ตฌ์„ฑํ•˜์—ฌ ๋ณด๋‹ˆ ์ƒ๊ฐ๋ณด๋‹ค ๊ฐ„๋‹จํ•˜๊ณ , ๊ตฌ์„ฑํ•˜๋Š” ๋ฐ ์˜ค๋ž˜ ๊ฑธ๋ฆฌ์ง€ ์•Š์•„์„œ ์•ž์œผ๋กœ๋„ ์—ฌ๋Ÿฌ๊ฐ€์ง€ ๋ชจ๋‹ˆํ„ฐ๋ง ์•Œ๋ฆผ์„ ๋ฐ›๋Š” ๋ฐ์— ์œ ์šฉํ•˜๊ฒŒ ์“ฐ์ผ ๊ฒƒ ๊ฐ™์Šต๋‹ˆ๋‹ค. ๐Ÿ˜

๊ด€๋ จํ•˜์—ฌ ๊ถ๊ธˆํ•˜์‹  ์‚ฌํ•ญ์ด๋‚˜ ๋ฌธ์˜ ์‚ฌํ•ญ์ด ์žˆ์œผ์‹œ๋ฉด ์•„๋ž˜์— ๋Œ“๊ธ€ ๋ฐ ์˜๊ฒฌ ๋‚จ๊ฒจ์ฃผ์„ธ์š”! ๐Ÿ‘


๊ฐ์‚ฌํ•ฉ๋‹ˆ๋‹ค.
ํด๋ผ์šฐ๋“œ ๊ธฐ์ˆ ์ง€์›ํŒ€ ๋“œ๋ฆผ

1 thought on “๐Ÿ—จ AWS Chatbot์„ ์‚ฌ์šฉํ•˜์—ฌ Slack ์ฑ„๋„์—์„œ Amazon EventBridge ์ด๋ฒคํŠธ ๋ชจ๋‹ˆํ„ฐ๋ง”

Leave a Comment