Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to confirm the subscription of Amazon SNS without having the endpoint token?

In my JAVA application, I'm using Amazon SNS to send emails to customer; Once I subscribe one customer(email id) into my SNS Topic; It is asking the customer to confirm the subscription to receive the emails;

Is there any way to confirm the subscription in our application itself(without cusstomer's help)?

like image 766
It's me Avatar asked Aug 13 '13 05:08

It's me


People also ask

How do I check my SQS subscription?

To confirm the subscription, you can use the Amazon SQS console or the ReceiveMessage action. Before you subscribe an endpoint to the topic, make sure that the queue can receive messages from the topic by setting the sqs:SendMessage permission for the queue.

Does Amazon SNS guarantee that messages are delivered to the subscribed endpoint?

If the user owns both the Amazon SNS topic being subscribed to and the SQS queue receiving the notifications, nothing further is required. Any message published to the topic will automatically be delivered to the specified SQS queue.

Which of the following can subscribe as an endpoint to Amazon SNS topic?

You specify the endpoint using its URL. To subscribe to a topic, you can use the Amazon SNS console, the sns-subscribe command, or the Subscribe API action.

What is SNS confirmation?

Usually, this means creating and deploying a web application (for example, a Java servlet if your endpoint host is running Linux with Apache and Tomcat) that processes the HTTP requests from Amazon SNS. When you subscribe an HTTP endpoint, Amazon SNS sends it a subscription confirmation request.


1 Answers

No, it is not possible.

The entire point of the confirmation step is to force the end user to confirm the subscription so that SNS cannot be used as a spamming mechanism. If SNS allowed the application developer to confirm subscriptions without access to the endpoint token, then you could confirm anyone's email address.

Note however, that SNS could technically implement a feature which would allow the email owner to confirm subscriptions for your account, so that if your application will be subscribing and unsubscribing an email address from lots of topics, they wouldn't have to confirm each one. Sadly, that feature currently doesn't exist.

One other possibility which would actually give you what you need is if SNS allowed you to send emails from your SES account and use your SES trust level. Again, this feature doesn't exist currently.

Until the SNS team delivers a feature which allows this use case, if you need to deliver to customers, you could allow SNS to do the fanout for you to HTTP or SQS queues, then deliver emails from those notification using SES.

like image 181
tster Avatar answered Nov 16 '22 03:11

tster