Subscribe to SNS


To receive messages published to a topic, you must subscribe an endpoint (such as AWS Lambda, Amazon SQS, HTTP/S, or an email address) to the topic. When you subscribe an endpoint to a topic and confirm the subscription, the endpoint begins to receive messages published to the associated topic. lets see how we can subscribe to SNS.

Create project in anypoint studio and configure the listener to trigger the flow

Drag and drop subscribe operation and provide the connector configuration

Subscribe to SNS


Configure the topic arn,protocol and endpoint

Topic ARN: ARN of the topic you want to subscribe to

To get the topic arn you can get the arn value from amazon SNS Service as shown below

Subscribe to SNS


Protocol: you can configure the different other protocol SMS,EMAIL,HTTP,SQS etc

Endpoint: Configure that you want to receive notifications

Subscribe to SNS


Deploy the project and trigger to test from soapui

You can see the message as pending confirmation

Subscribe to SNS


In our case I have configured the email as a endpoint, I need to confirm the subscription from email

Email has received to confirm the subscription


Once you click on the subscription below message is displayed


Once you confirm the subscription ,the endpoint begins to receive messages published to the associated topic.

Sample application: subscribe endpoint sample application

Soap ui sample project: SubscribeEndpoint-soapui-project sample project


Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.

Share this:
Notify of
Inline Feedbacks
View all comments