how to send AWS CloudWatch Alarms to Slack? (Terraform Included)

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ส.ค. 2024
  • 🔴 - To support my channel, I’d like to offer Mentorship/On-the-Job Support/Consulting - me@antonputra.com
    ▬▬▬▬▬ Experience & Location 💼 ▬▬▬▬▬
    ► I’m a Senior Software Engineer at Juniper Networks (12+ years of experience)
    ► Located in San Francisco Bay Area, CA (US citizen)
    ▬▬▬▬▬▬ Connect with me 👋 ▬▬▬▬▬▬
    ► LinkedIn: / anton-putra
    ► Twitter/X: / antonvputra
    ► GitHub: github.com/antonputra
    ► Email: me@antonputra.com
    ▬▬▬▬▬▬ Related videos 👨‍🏫 ▬▬▬▬▬▬
    👉 [Playlist] Kubernetes Tutorials: • Kubernetes Tutorials
    👉 [Playlist] Terraform Tutorials: • Terraform Tutorials fo...
    👉 [Playlist] Network Tutorials: • Network Tutorials
    👉 [Playlist] Apache Kafka Tutorials: • Apache Kafka Tutorials
    👉 [Playlist] Performance Benchmarks: • Performance Benchmarks
    👉 [Playlist] Database Tutorials: • Database Tutorials
    =========
    ⏱️TIMESTAMPS⏱️
    0:00 Intro
    0:42 Create SNS Topic
    2:52 Create Slack App
    3:58 Create Lambda Function
    6:54 Subscribe Lambda to SNS Topic
    9:09 Create CloudWatch Alarm
    =========
    Source Code
    📚 - Tutorial: antonputra.com/amazon/send-aw...
    #AWS #Slack #DevOps #CloudWatch
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 22

  • @AntonPutra
    @AntonPutra  10 หลายเดือนก่อน +1

    🔴 - To support my channel, I’d like to offer Mentorship/On-the-Job Support/Consulting - me@antonputra.com

  • @venkatk5143
    @venkatk5143 ปีที่แล้ว +1

    Keep up the great work, much helpful as it's simple and straight forward, precise to the topic, good stuff.🙌

  • @grantjeffers127
    @grantjeffers127 ปีที่แล้ว +2

    It is a treat to find a video that is so concise and on-topic at exactly the right level. The Terraform bits went by pretty fast -- could you please post a link to your example code?

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว

      Thanks Grant! You can find link in the description.
      Code: github.com/antonputra/tutorials/tree/main/lessons/122

  • @BillCodess
    @BillCodess 7 หลายเดือนก่อน

    Hi Anton if I understand the code well this is done to handle only a single alarm type. If we want to register multiple alarms what would the Lambda Function look like? Great video and it's very helpful thank you!

  • @user-py6to3yd4m
    @user-py6to3yd4m 8 หลายเดือนก่อน

    Diakuy, Anton. Duje vajlyva infa.

  • @AntonPutra
    @AntonPutra  ปีที่แล้ว +1

    👉 How to Manage Secrets in Terraform - th-cam.com/video/3N0tGKwvBdA/w-d-xo.html
    👉 Terraform Tips & Tricks - th-cam.com/video/7S94oUTy2z4/w-d-xo.html
    👉 ArgoCD Tutorial - th-cam.com/video/zGndgdGa1Tc/w-d-xo.html

  • @AntonPutra
    @AntonPutra  ปีที่แล้ว +1

    ❤Performance Benchmarks Playlist - th-cam.com/play/PLiMWaCMwGJXl-h2RgOSpdO-pQaSRwlVjd.html

  • @user-so2dk2pr4j
    @user-so2dk2pr4j ปีที่แล้ว

    Great video, But I'm having trouble adjusting' Timezone, can you help me customize it?

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว +1

      I think you need to do it in code, convert utc to your timezone

    • @user-so2dk2pr4j
      @user-so2dk2pr4j ปีที่แล้ว

      Yes , but I am beginner
      Can you have a sample for me?
      Thankyou for reply Comment :)

  • @sjokkz
    @sjokkz ปีที่แล้ว

    can't get register and resolve alarm to work for different cw alarm, not with instanceid

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว

      Any errors?

    • @sjokkz
      @sjokkz ปีที่แล้ว

      @@AntonPutra no errors, simply the lambda doesn't get triggered when the status is changed i.e from In Alarm to OK

    • @sjokkz
      @sjokkz ปีที่แล้ว

      @Anton tnx for the reply and tnx for the tutorial, found the issue, I was missing the ok_actions and in my tf code, hence the resolve_alarm function was not triggered.
      but what is most interesting. in the alarm on AWS console UI ok_actions and insufficient_data_actions are tied to the lambda arn, before specifying in tf.

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว

      @@sjokkz check if you receive sns messages from cw if yes check your logic

  • @thapelomdaka8595
    @thapelomdaka8595 ปีที่แล้ว

    Can we get the terraform code as well

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว

      with a new tutorial sure

  • @pridhviraj9392
    @pridhviraj9392 ปีที่แล้ว

    Great video, I have pasted the code in the lambda function and deployed changes but gettin the following error when testing it
    {
    "errorMessage": "'Records'",
    "errorType": "KeyError",
    "requestId": "92aef6ab-8aca-47bb-8445-65f3e4eb94d6",
    "stackTrace": [
    " File \"/var/task/lambda_function.py\", line 138, in lambda_handler
    sns_message = json.loads(event[\"Records\"][0][\"Sns\"][\"Message\"])
    "
    ]
    }
    can you help me with this

    • @AntonPutra
      @AntonPutra  ปีที่แล้ว

      maybe you made a typo..