An SNS topic publishes order, return, and support events.
The billing service needs orders and the support service needs returns, without changing the publisher.
Which feature is most appropriate?
Use an SNS subscription filter policy so each subscriber receives messages whose attributes match its own filter.
Detailed explanation
This couples the publisher to subscribers and increases the impact of adding or changing consumers.
This couples the publisher to subscribers and increases the impact of adding or changing consumers.
A subscriber filter can select messages by attributes without coupling the publisher to every consumer.
A subscriber filter can select messages by attributes without coupling the publisher to every consumer.
An IAM principal name is not a message-delivery filter.
An IAM principal name is not a message-delivery filter.
S3 object lifecycle rules do not filter SNS message delivery.
S3 object lifecycle rules do not filter SNS message delivery.
Check official documentation
Compare the following points with the official documentation.
Amazon SNS subscription filter policyの公式説明を確認する。
What to confirm
発行側を変更せず購読者ごとの配信条件を設計できる。
Key points
- SNS subscription
- Filter policy
- Message attribute
Notes
- Environment: AWS公式SNSドキュメントの確認
- Confirm current AWS service behavior in the official documentation.
Foundation review
Publisher independence
Subscriber filters allow new consumers or routing rules without changing the publisher's code.
Metadata routing
The filter evaluates attributes, so producers must publish the attributes needed by subscribers.