Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to subscribe to Amazon SNS topic with e-mail endpoint via e-mail?

I'm using Amazon SNS to send simple messages to users. I'm using several topic with different endpoints including E-Mail.

Right now subscribtion to topics is handled by the Java back-end via AWS Java SDK. I get user's address and create a subscription via AmazonSNSClient. The user has to confirm his subscription. Later or he can unsubscribe just by clicking a link in the mail sent my Amazon SNS.

What I was wondering - isn't is possible to let users subscribe via e-mail?
Like sending an e-mail to [email protected] with the ARN of the topic as subject - or similar?

I could then just display a mailto: link as a subscription link in my application which has a few advantages in my case.

like image 606
lexicore Avatar asked Feb 09 '23 03:02

lexicore


2 Answers

I see you comparing SNS to mailing lists. What you need to realize is that SNS isn't designed for use as a mailing list, and is indeed extremely terrible at sending any sort of nice looking email to end users. I would only recommend using SNS emails for things like system outage alerts to your administrative staff. I think this confusion comes in because the SNS mobile push feature is designed to push messages to end users, but the other SNS notification methods (email, http, SMS, SQS, Lambda) aren't designed for end-users at all.

If you want to stick with AWS services, then you could build a newsletter feature on top of SES, or use something like Sendy. I would personally recommend looking outside AWS for a full featured email service like MailChimp or SendGrid.

like image 90
Mark B Avatar answered Feb 12 '23 11:02

Mark B


Subscribing to email notifications by email would be open to misuse - just find a way to construct an email with a forged from address and you'll have hundreds of subscribers.

So this clearly is not safe from a security perspective - which is probably whay it's not there in the first place.

like image 35
Jan Avatar answered Feb 12 '23 11:02

Jan