Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER

How to: Getting started with the Amazon SNS connector in Qlik Application Automation

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
MarkGeurtsen
Support
Support

How to: Getting started with the Amazon SNS connector in Qlik Application Automation

Last Update:

Apr 20, 2023 8:40:11 AM

Updated By:

Sonja_Bauernfeind

Created date:

Apr 20, 2023 8:14:01 AM

This article explains how the Amazon SNS connector in Qlik Application Automations can be used to set up webhooks that trigger when a object creation event occurs in Amazon S3. This connector only has webhooks available.

Content:

 

How to connect

Search for the "Amazon SNS" connector in Qlik Application Automations. When you click connect, you will be prompted for the following input parameters:

  • Aws_access_key_id: This is the access key you obtain from AWS.
  • Aws_secret_access_key: This is the secret key you obtain from AWS.
  • Region: Your AWS region where your resources are situated.

You must obtain the AWS Access Key from IAM in your AWS console. This can be obtained by going to the IAM section in AWS and in the left side panel choose users.

Here you can choose either for an already existing user or creating a new one by clicking the "Add Users" button in the topright.

add user in identity and access management.png

When you create a new user, you must provide a user name and click next. You do not need to give this user access to the AWS console. In the next step, you will give permissions to do this IAM user.

The following policy needs to be created and attached to the IAM user, replace the account-id with your account ID:

Other permissions that are suggested to add are:

  • s3:ListBucket
  • s3:ListAllMyBuckets
  • sns:ListTopics

Furthermore, the IAM user must be made an owner of a S3 bucket when creating a notification configuration.

 

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "s3:PutBucketNotification",
                "iam:PassRole",
                "sns:Publish",
                "sns:CreateTopic",
                "sns:Subscribe"
            ],
            "Resource": [
                "arn:aws:s3:::*",
                "arn:aws:iam::account-id:role/*",
                "arn:aws:sns:*:account-id:*"
            ]
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": "sns:Unsubscribe",
            "Resource": "*"
        }
    ]
}

 

You will have to create an access key for the IAM user.

This can be done in the (a) Users menu and in the (b) Security credentials tab. Click (c) Create access key.

Create access key.png

Choose Third-party service and choose to understand the above recommendation, click next:

access key best practices and alternatives.png

You will now have your access key and secret key and can finish creating the datasource in Qlik Application Automation:

retieve access key.png

 

Using this in an automation

You can use this in an automation, but only as a webhook. When you create a new automation, you will be presented with a blank canvas. Select the Start block and change the run mode to webhook.

Choose an event type next. These are currently limited to S3 object creation events. You will have lookup capabilities available to other parameters, such as bucket and topic selection:

one file uploaded to bucket.png

After saving the automation, you can test the webhook by uploading objects in your S3 bucket and see in your automation run history that it is triggering this automation.

The use of this is that you can now trigger tasks after a object is uploaded to S3. Common tasks will be to reload a Qlik Sense app or trigger a data pipeline in any of our other connectors:

on file uploaded to bucket.png

Labels (1)
Comments
huongphan
Contributor
Contributor

Thank you for your post!

I followed it but I am wondering that we have to config anything else ? Because I did your steps but when I uploaded files to S3, it does not work

Version history
Last update:
‎2023-04-20 08:40 AM
Updated by: