To use the Amazon SNS connector, before carrying out any other Amazon SNS operations, add the <amazonsns.init>
element in your configuration before carrying out any other Amazon SNS operations. This uses the standard HTTP Authorization header to pass authentication information. Developers are issued Once you register, it issues you an AWS access key ID and an AWS secret access key when they register. For request authentication, the AWSAccessKeyId
element identifies the access key ID that was used to compute the signature and, indirectly, the developer user who is making the request.
Code Block | ||||
---|---|---|---|---|
| ||||
<amazonsns.init> <region>{$ctx:region}</region> <secretAccessKey>{$ctx:secretAccessKey}</secretAccessKey> <accessKeyId>{$ctx:accessKeyId}</accessKeyId> <version>{$ctx:version}</version> <enableSSL>{$ctx:enableSSL}</enableSSL> <disablePort>{$ctx:disablePort}</disablePort> </amazonsns.init> |
...
region:
The regional endpoint to make your requests (e.g., us-east-1).secretAccessKey:
The secret access key of the account.accessKeyId:
The access key ID that corresponds to the secret access key that is used to sign the request.version:
The API version that the request is written for.enableSSL
: Optional - Whether This is an optional property, which specifies whether the amazon AWS URL should be http HTTP or httpsHTTPS. Set totrue
if you want the URL to be httpsHTTPS.- disablePort: Optional - By default it sets to This is an optional property. By default, it is set to
false
and adds the port(80/443) in to each request. If you want to disable the port, please set it totrue
.
Additional information
Ensure that the following Axis2 configurations are added and enabled.
...
Code Block | ||||
---|---|---|---|---|
| ||||
<messageBuilder contentType="application/x-www-form-urlencoded" class="org.apache.synapse.commons.builders.XFormURLEncodedBuilder"/> |
Now, that you have connected to Amazon SNS, see the information in the following topics to perform various operations with the connector.
...