Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sending attachment using AWS SNS(Simple Notification Service)

Tags:

amazon-sns

I am using AWS SNS for sending alert emails. Now the email content is really long therefore I wish to send it as a file attachment rather than sending it as a email content. Can this be done using SNS ?

like image 965
Shubham Mishra Avatar asked Aug 25 '15 07:08

Shubham Mishra


People also ask

Can SNS send email with attachment?

No, it can't. The SNS FAQ does not come out and explain this explicitly, but it can be inferred from several statements: Amazon SNS messages can contain up to 256 KB of text data, including XML, JSON and unformatted text.

Which operations does Simple Notification Service support SNS?

The Amazon SNS service can support a wide variety of needs including event notification, monitoring applications, workflow systems, time-sensitive information updates, mobile applications, and any other application that generates or consumes notifications.

Which of the following is not a supported Amazon Simple Notification Service Amazon SNS protocol?

Amazon DynamoDB is not a supported Amazon SNS protocol. 2. When you create a new Amazon Simple Notification Service (Amazon SNS) topic, which of the following is created automatically?


1 Answers

No, it can't.

The SNS FAQ does not come out and explain this explicitly, but it can be inferred from several statements:

Amazon SNS messages can contain up to 256 KB of text data, including XML, JSON and unformatted text.

The ”Email” transport is meant for end-users/consumers and notifications are regular, text-based messages which are easily readable.

In addition, since you do not have access to the email header space when publishing to SNS, it is not possible to specify the necessary multipart coding for an email client to decide an embedded attachment. You can't even send HTML emails (well, you could, but a standards-conforming email client would not render them as HTML).

Now, many email clients will theoretically recognize http://... in an email body and turn them into clickable links, allowing you to link to the desired file... but that of course is not the same thing as attaching files.

I there does not appear to be a mechanism for attaching files to emails in SNS.

like image 157
Michael - sqlbot Avatar answered Sep 21 '22 12:09

Michael - sqlbot