Studio Visual Editor
-
Click the Global Elements tab at the base of the canvas.
-
On the Global Mule Configuration Elements screen, click Create.
-
In the Choose Global Type wizard, expand Connector Configuration and select Amazon SNS: Configuration and click Ok.
-
Configure the parameters according to instructions below.
Parameter Description Name
Enter a name for the configuration to reference it.
Access Key
Alphanumeric text string that uniquely identifies the user who owns the account.
Secret Key
Key that plays the role of a password.
Try AWS Credentials Provider Chain
Checkbox that controls whether temporary credentials should be used.
Region Endpoint
Set the topic region endpoint.
Topic Arn
Topic ARN to test the connectivity.
In the image above, the placeholder values refer to a configuration file placed in the src
folder of your project. See Learn how to configure properties.
You can either enter your credentials into the global configuration properties, or reference a configuration file that contains these values. For simpler maintenance and better re-usability of your project, Mule recommends that you use a configuration file. Keeping these values in a separate file is useful if you need to deploy to different environments, such as production, development, and QA, where your access credentials differ. See Deploying to Multiple Environments for instructions on how to manage this.
-
Keep the Pooling Profile and the Reconnection tabs with their default entries.
-
Click Test Connection to confirm that the parameters of your global configuration are accurate, and that Mule is able to successfully connect to your instance of Amazon S3. Read more about this in Testing Connections.
-
Click OK to save the global connector configurations.
XML Editor
First, ensure that you have included the Amazon SNS namespaces in your configuration file.
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:sns="http://www.mulesoft.org/schema/mule/sns" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/sns http://www.mulesoft.org/schema/mule/sns/current/mule-sns.xsd">
<!-- Put your flows and configuration elements here -->
</mule>
Follow these steps to configure an Amazon S3 connector in your application: Create a global Amazon S3 configuration outside and above your flows, using the following global configuration code.
<sns:config name="Amazon_SNS__Configuration" accessKey="${amazon.accesskey}" secretKey="${amazon.secretkey}" topicArn="${amazon.sns.topic.arn}" doc:name="Amazon SNS: Configuration"/>