AWS SNS
The aws_sns
notification platform enables publishing to an AWS SNS topic or application.
To use this notification platform in your installation, add the following to your configuration.yaml
file:
# Example configuration.yaml entry notify: platform: aws_sns name: NOTIFIER_NAME aws_access_key_id: AWS_ACCESS_KEY_ID aws_secret_access_key: AWS_SECRET_ACCESS_KEY profile_name: AWS_PROFILE region_name: 'us-east-1'
Configuration variables:
- aws_access_key_id (Required if aws_secret_access_key is provided): Your AWS Access Key ID. For more information, please read the AWS General Reference regarding Security Credentials. If provided, you must also provide an
aws_secret_access_key
and must not provide aprofile_name
. - aws_secret_access_key (Required if aws_access_key_id is provided): Your AWS Secret Access Key. For more information, please read the AWS General Reference regarding Security Credentials. If provided, you must also provide an
aws_access_key_id
and must not provide aprofile_name
. - profile_name (Optional): A credentials profile name. For more information, please see the boto3 documentation section about credentials.
- region_name (Required): The region identifier to connect to. The default is
us-east-1
. - name (Optional): Setting the optional parameter
name
allows multiple notifiers to be created. The default value isnotify
. The notifier will bind to the servicenotify.NOTIFIER_NAME
.
Usage
AWS SNS is a notify platform and thus can be controlled by calling the notify service as described here. It will publish a message to all targets given in the notification payload. A target must be a SNS topic or endpoint ARN (Amazon Resource Name). For more information, please see the boto3 docs.
If one exists, the SNS Subject will be set to the title. All attributes from the payload except message will be sent as stringified message attributes.