0

A SNS topic has 2 subscriptions. one with filter policy (lets call this A) and other without (lets call this B). When a message is published to the SNS topic with filter attributes matching subscription with filter policy(subscription A), it receives the message. The issue I am finding here is the one without filter policy(subscription B) is also receiving the same message. How do I send message to only subscription "A"?

Say I add a different filter policy to subscription B. Then if I publish message to SNS with filter policy attribute of subscription A, only the subscription A will receive the message. This solves the problem I mentioned earlier, but there is a limit of 200 subscription filter policies per account. This kinda destroys the purpose of having subscription filter policies.

To conclude my question : How do I send message to only subscription "A" without adding filter policies to other subscriptions of the same topic?

NOTE: The SNS protocol used is EMAIL. I am also NOT looking into increasing the SNS limit.

  • What actual use-case are you attempting to solve? Are you intending to have many 'users' subscribe to a topic, but you only wish to send a notification to a particular user? What type of messages are you sending, are they notifications within your IT operation, or are they going external to your org? Knowing your higher-level goal will make it easier to suggest how to accomplish your goal, or even recommend an alternative method. – John Rotenstein Mar 26 '20 at 01:15
  • It is many users subscribed to topic and sending message to only particular user. The notification is going to external users who subscribe with their email-IDs. – missing-semi-colon Mar 26 '20 at 10:03

1 Answers1

0

If your use-case is to email users, then Amazon SNS is not really an appropriate architecture. Amazon SNS is best used for message-passing between applications, or for alerts to internal staff.

For emailing external users, you really should use Amazon Simple Email Service (SES).

John Rotenstein
  • 241,921
  • 22
  • 380
  • 470