From 37ad690d097df2d467a6a93d890abe8887481587 Mon Sep 17 00:00:00 2001 From: Ethem Cem Özkan Date: Sun, 2 Jun 2024 04:48:56 +0200 Subject: Add AWS SNS notification support for webhook (#15184) Support for AWS SNS notifications. SNS is a widespread service that is used to integrate with other AWS services(EG lambdas). This support would unlock use cases like triggering lambda functions, especially when AWX is deployed on EKS. Decisions: Data Structure - I preferred using the same structure as Webhook for message body data because it contains all job details. For now, I directly linked to Webhook to avoid duplication, but I am open to suggestions. AWS authentication - To support non-AWS native environments, I added configuration options for AWS secret key, ID, and session tokens. When entered, these values are supplied to the underlining boto3 SNS client. If not entered, it falls back to the default authentication chain to support the native AWS environment. Properly configured EKS pods are created with temporary credentials that the default authentication chain can pick automatically. --------- Signed-off-by: Ethem Cem Ozkan --- docs/docsite/rst/userguide/notifications.rst | 13 +++++++++++++ docs/notification_system.md | 5 +++++ 2 files changed, 18 insertions(+) (limited to 'docs') diff --git a/docs/docsite/rst/userguide/notifications.rst b/docs/docsite/rst/userguide/notifications.rst index e7e8234111..ff7691c6fd 100644 --- a/docs/docsite/rst/userguide/notifications.rst +++ b/docs/docsite/rst/userguide/notifications.rst @@ -84,6 +84,7 @@ Notification Types .. index:: pair: notifications; types + triple: notifications; types; AWS SNS triple: notifications; types; Email triple: notifications; types; Grafana triple: notifications; types; IRC @@ -101,6 +102,18 @@ Notification types supported with AWX: Each of these have their own configuration and behavioral semantics and testing them may need to be approached in different ways. Additionally, you can customize each type of notification down to a specific detail, or a set of criteria to trigger a notification. See :ref:`ug_custom_notifications` for more detail on configuring custom notifications. The following sections will give as much detail as possible on each type of notification. +AWS SNS +------- + +The AWS SNS(https://aws.amazon.com/sns/) notification type supports sending messages into an SNS topic. + +You must provide the following details to setup a SNS notification: + +- AWS Region +- AWS Access Key ID +- AWS Secret Access Key +- AWS SNS Topic ARN + Email ------- diff --git a/docs/notification_system.md b/docs/notification_system.md index edd64275fe..96502edfa9 100644 --- a/docs/notification_system.md +++ b/docs/notification_system.md @@ -70,6 +70,7 @@ Once a Notification Template has been created, its configuration can be tested b The currently-defined Notification Types are: +* AWS SNS * Email * Slack * Mattermost @@ -82,6 +83,10 @@ The currently-defined Notification Types are: Each of these have their own configuration and behavioral semantics and testing them may need to be approached in different ways. The following sections will give as much detail as possible. +## AWS SNS + +The AWS SNS notification type supports sending messages into an SNS topic. + ## Email The email notification type supports a wide variety of SMTP servers and has support for SSL/TLS connections and timeouts. -- cgit v1.2.3