简体   繁体   English

有没有一种方法可以使用 AWS SNS 过滤策略从消息正文过滤到 SQS 队列?

[英]Is there a way to filter with AWS SNS filter policies from the message body to SQS queues?

I have a general question about SNS filter policies.我有一个关于 SNS 过滤策略的一般性问题。 I know that the filter policies filter based on the Message Attributes.我知道过滤策略基于消息属性进行过滤。 If we wanted to filter based on the body, is there a work around to do so?如果我们想根据身体进行过滤,是否有解决方法?

The SNS topic will be delivering different types of data to SQS queues based on the filter policies. SNS 主题将根据过滤策略将不同类型的数据传送到 SQS 队列。

Yes, there is now a property called "FilterPolicyScope" in the SNS Subscription resource which, if set to "MessageBody" instead of "MessageAttributes" the default, will apply the Filter Policy to the message body instead of the message attributes.是的,现在 SNS 订阅资源中有一个名为“FilterPolicyScope”的属性,如果将其设置为“MessageBody”而不是默认的“MessageAttributes”,则会将过滤策略应用于消息正文而不是消息属性。

More information and an example of how you can filter on fields in the s3 event being passed to SNS here更多信息和如何过滤传递给 SNS 的 s3 事件中字段的示例,请点击此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM