Amazon Simple Notification Service (SNS) is a managed service that provides message delivery from publishers to subscribers (also known as producers and consumers). Publishers communicate asynchronously with subscribers by sending messages to a topic, which is a logical access point and communication channel. Clients can subscribe to the SNS topic and receive published messages using a supported protocol, such as Amazon SQS, AWS Lambda, HTTP, email, mobile push notifications, and mobile text messages.
Workflow of Amazon SNS
An Amazon SNS topic is a logical access point that acts as a communication channel.The first and most common Amazon SNS task is creating a topic. If no topics are present under AWS account, then topic needs to be created. After the topic is created, clients can subscribe to that topic.
Coming to our Amazon SNS plugin, let’s see what our plugin can perform so that workload automation users can make use of this to manage their message delivery system.
Clients can subscribe to any topic which are present in the AWS account and add the email-id(for our plugin, email is chosen as message delivery method).In the plugin, proper connection details to the AWS account has to be entered. The user may choose any of the topic and enter the message. All the subscribers for that topic will receive an email with that message. The users can also choose message filters so that the message is delivered to the selected subscribers.
Let us begin with our plugin part with job definition parameters.
Log in to the Dynamic Workload Console(DWC) and open the Workload Designer.
Choose to create a new job and select “AWS SNS” jobtype in the Cloud section.
Establishing connection to the AWS server :
In the connection tab,specify the Access Key ID,Secret Access Key and AWS Region fields to connect to AWS server from Workload Automation end and click on Test Connection.
A success message will get displayed when the connection is successful.
- Access Key ID : This attribute is associated with the AWS account and is mandatory.
- Secret Access Key : This attribute is associated with the AWS account and is mandatory.
- AWS Region : This attribute is related to the location in which topics are created. This field is also mandatory.
In Action tab, specify the topic ARN, message body and message attributes.
- Topic ARN : Name of the topic. Click the Select button to fetch the list of available topics in AWS account. Select one topic from the list and the selected topic is displayed in topic field. This field is mandatory.
- File Path(Message body from file) : The full file path of the file in the agent where message to be delivered is stored. This field is mandatory.
- Message body(Message body from manual input) : The full message which will be delivered. This field is mandatory.
However, user has to choose anyone of the above two options(file path and message body).
- Message attributes : The message attributes for applying subscription filter policy so that the message is delivered to the selected subscribers. This field is optional.
Submitting job :
It’s time to submit the job into current plan. Select the action menu in the top-left corner of the job definition panel and click on Submit Job into Current Plan. A confirmation message is displayed, and you can switch to the Monitoring view to see what is going on.
Monitor Workload :
Job Log Details :
Extra Properties :
SNS Notification in email :
Are you curious to try out the Amazon SNS plugin ? Download the integrations from the Automation Hub and get started or drop a line at firstname.lastname@example.org.
AUTHOR’S BIO :
Paolo Canofari, Developer at HCL Technologies
Works as a Developer for the Workload Automation L3 Support in HCLSoftware, Rome. Having skills on Java, Python, C/C++, Angular 8 and Docker/Kubernetes deployments.
Arka Mukherjee, Quality Analyst at HCL Technologies
Working as Quality Analyst for the Workload Automation team in HCLSoftware, Bangalore. Worked both in manual and automation test scenarios across various domains.