Русские видео

Сейчас в тренде

Иностранные видео


Скачать с ютуб Filtering Notifications from CloudWatch Alarms with AWS SNS в хорошем качестве

Filtering Notifications from CloudWatch Alarms with AWS SNS 1 месяц назад


Если кнопки скачивания не загрузились НАЖМИТЕ ЗДЕСЬ или обновите страницу
Если возникают проблемы со скачиванием, пожалуйста напишите в поддержку по адресу внизу страницы.
Спасибо за использование сервиса savevideohd.ru



Filtering Notifications from CloudWatch Alarms with AWS SNS

Learn how to customize your email notifications by filtering messages from CloudWatch alarms sent through AWS SNS using a Lambda function. Get clear, organized steps for better alert management! --- This video is based on the question https://stackoverflow.com/q/70307210/ asked by the user 'Ali Raza' ( https://stackoverflow.com/u/7337445/ ) and on the answer https://stackoverflow.com/a/70307359/ provided by the user 'Caldazar' ( https://stackoverflow.com/u/1992773/ ) at 'Stack Overflow' website. Thanks to these great users and Stackexchange community for their contributions. Visit these links for original content and any more details, such as alternate solutions, latest updates/developments on topic, comments, revision history etc. For example, the original title of the Question was: Filter messages published by cloudwatch alarms on an SNS topic to receive email notifications Also, Content (except music) licensed under CC BY-SA https://meta.stackexchange.com/help/l... The original Question post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license, and the original Answer post is licensed under the 'CC BY-SA 4.0' ( https://creativecommons.org/licenses/... ) license. If anything seems off to you, please feel free to write me at vlogize [AT] gmail [DOT] com. --- Filtering Notifications from CloudWatch Alarms with AWS SNS: A Step-by-Step Guide Managing notifications for various projects using Amazon Web Services (AWS) can be quite a challenge, especially when dealing with CloudWatch alarms and Simple Notification Service (SNS) topics. Suppose your organization uses a shared SNS topic across multiple projects. In that case, you might find yourself inundated with alert emails for alarms that aren’t relevant to your specific project. This can lead to confusion and potential oversight of critical alerts that genuinely need your attention. In this guide, we will delve into the problem of receiving irrelevant email notifications from CloudWatch alarms and provide a solution that allows you to filter these notifications effectively. The Problem with Shared SNS Topics When you use a shared SNS topic for transmitting messages from CloudWatch alarms, you will receive notifications for all alarms tied to that topic. This can become cumbersome, especially if your team only requires alerts from specific projects. The challenge is further compounded by the fact that the messages generated by CloudWatch alarms do not include any message attributes that you could use for filtering the notifications sent to SNS subscribers. An Effective Solution: Using AWS Lambda for Filtering While it is true that you cannot directly filter messages sent from CloudWatch alarms via SNS using message attributes, there is an effective workaround utilizing AWS Lambda. Here’s how you can implement this solution: Step 1: Create a Lambda Function Start by creating an AWS Lambda function that has the permission to send messages to your SNS topic. This function will act as an intermediary, processing the alarm notifications before they reach your SNS subscribers. Step 2: Configure CloudWatch Alarms to Invoke the Lambda Function Instead of directing your CloudWatch alarms to the SNS topic, configure them to trigger the Lambda function. This ensures that all alarm notifications are handled specifically by this function. Step 3: Write a Parsing Logic in the Lambda Function Within your Lambda function, you will implement parsing logic that can classify the CloudWatch alarm based on the project it is associated with. This could involve: Reading the incoming message and identifying relevant attributes. Determining which project the alarm belongs to based on the content of the alert. Step 4: Publish Messages to SNS with Custom Message Attributes Once your Lambda function processes the alarm and identifies the project, it should send a message to the SNS topic. This is where it gets interesting – you’ll add a custom Message Attribute that corresponds to the project identifier. This attribute will then facilitate the filtering of notifications based on the specific criteria defined for your projects. Example of Custom Message Attributes Project Name: Could represent the name of your project. Priority Level: This could indicate the urgency of the alert. Environment: Whether the alarm is from production or a staging environment. Step 5: Set Up Subscription Filters After you publish the message with custom attributes, ensure that your SNS subscriptions are set to filter based on these attributes. This way, only relevant alerts will reach you, improving your alert management and allowing you to focus on what truly matters. Conclusion Managing alerts can be complex, especially when multiple projects share resources within AWS. However, by leveraging a Lambda function to parse and filter messages based on custom attributes, you can streamline your notification process significantly. T

Comments