The purpose of this snippet is to show how to create a route that sends SNS to amazon using Camel and how to configure amazon in order to send a SMS each time a SNS is received.

First you must link the camel libraries in order to use amazon SNS. See this previous post if you are not comfortable with this process.

Add the following lines in your pom file:


We are using the version 2.18 of Camel that lets you specify the arn address.

Next you must add a route that triggers SNS as shown below:

  <from uri="timer://pubsubid?fixedRate=true&amp;period=5000"/>
    <simple>Hello world !</simple>
  <removeHeaders pattern="*"/>
  <to uri="aws-sns:arn:aws:sns:us-west-2:XXXXXXXXXXX:testalert?accessKey=YYYYYYYYYYY&amp;secretKey=ZZZZZZZZZZZZ&amp;"/>
  <to uri="log:MESSAGE?showAll=true"/>

In order to get your arn address, fire up the SNS console from amazon as shown in the next picture.


Create a SMS subscription to your topic as shown below.


Don’t forget to add a user and the ad hoc policy in the IAM console of amazon.