Alert to multiple sns topics
I am trying to set up a rule to publish to multiple sns topics. But I am not getting the configuration right.
I know I have the aws permissions right, because I can publish to any of the two topics, but I cannot do it with both. What I tried so far is:
alert:
- "sns"
sns:
sns_topic_arn: ["arn:aws-topic1", "arn:aws-topic2"] `
alert:
- "sns"
- "sns2"
sns:
sns_topic_arn: "arn:aws-topic1"
sns2:
sns_topic_arn: "arn:aws-topic2"`
And many other ways, but none seam to work. Is there anyway to setup what I want without creating multiple rules for the same thing?
ElastAlert documentation does not really mention the ability to specify multiple topics. If you look at the code you can see what you need to check: boto3 documentation. It's not an option, you need to implement this to the SNS check, but it shouldn't be hard.
You can set up multiple copies of an alerter by inlining the configurations
alert:
- sns:
sns_topic_arn: "aws-topic1"
- sns:
sns_topic_arn: "aws-topic2"
default_sns_settings: xyz
Thanks for the help, I missed the : after sns. It's working just fine now! :D