Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Apr 20, 2023 8:40:11 AM
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:
Search for the "Amazon SNS" connector in Qlik Application Automations. When you click connect, you will be prompted for the following input parameters:
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.
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:
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.
Choose Third-party service and choose to understand the above recommendation, click next:
You will now have your access key and secret key and can finish creating the datasource in Qlik Application 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:
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:
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