I'm in the process of figuring out how to receive AWS SNS notifications. I need some guidance on how to use the current implementation of the Amazon AWS Cloudwatch driver to interact with AWS SNS. I've mainly been going through the protocol.xml (loading it on DMA, creating element) and reading the associated help file. Feel free to point me to any documentation I may have missed.
First of all, I would like to better understand what interactions are supported with SNS:
Q1) From loading the driver in DataMiner and creating an element, I'm assuming that the driver will interact with SNS via HTTP(s) (as opposed to email). From the AWS FAQ: with HTTP(s), "subscribers specify a URL as part of the subscription registration; notifications will be delivered through an HTTP POST to the specified URL". So is it correct that we provide an HTTP(s) URL endpoint and port to post to? How do we specify the URL endpoint and port in the driver (I notice there is "HTTP connection" and "IP connection" in the driver, which ones to use)?
Q2) From the AWS FAQ: "It is possible to subscribe to a topic or be subscribed by the topic owner". Do we require the user to perform the subscription from AWS or does the driver have the capability to use SNS Subscriber Operations to subscribe to a topic?
Q3) I notice that there are a few other fields: Account, SNS URL, SNS Topic ARN, Access Key, Secret Key, Token. Which ones are relevant to setting up receiving SNS notifications and how should we set them and which ones are irrelevant?
Secondly, I would like to better understand how the driver secures the interaction with AWS SNS. (Q4) How does DataMiner make sure messages come from the right source?
Thanks in advance!
Hi,
I hope these steps would be helpful to configure SNS notifications for the CloudWatch driver.
On the AWS side:
SNS
- Create a SNS topic.
- Create a subscription for the topic specifying the endpoint HTTP or HTTPS.
- Endpoint example => [http://DataMiner_IP:CloudWatch_Driver_IP_Connection]
CloudWatch
- Create an alarm.
- Configure the alarm to use the topic.
On the DataMiner side.
- Allow the endpoint to receive the SNS notifications on the chosen port. It may require configuring the firewall to open the port on the server.
- On the driver configure the IP Connection with the chosen port to listen for SNS notifications.
Once the configuration is made on both sides it should be possible to subscribe to the notifications. This can be made on AWS from the topic’s configuration page on the subscriptions section. Once it is subscribed it will show on the Status as Confirmed. On the driver once the subscription is made it should show on the SNS Debug page the SNS URL and the Topic ARN.
At this point the driver is ready to receive SNS notifications. When a notification is received the driver will compare the account id received with the notification with the expected account id.
If the account id is the expected the driver will:
- Confirm the notification
- Poll the metrics on the dimension related with the notification if the polling is enabled on the driver for that dimension.