Amazon web services AWS S3:[其他/不匹配][事件/前缀/后缀]的事件通知配置
在通知文档(下面的链接)的通知配置示例中,它解释了前缀/后缀组合重叠的配置无效 然而,对于捕获任何未指定前缀的方法没有任何细节。如果我有一个目录为dir1/和dir2/的S3 bucket,通知配置如下:Amazon web services AWS S3:[其他/不匹配][事件/前缀/后缀]的事件通知配置,amazon-web-services,amazon-s3,filter,notifications,amazon-sns,Amazon Web Services,Amazon S3,Filter,Notifications,Amazon Sns,在通知文档(下面的链接)的通知配置示例中,它解释了前缀/后缀组合重叠的配置无效 然而,对于捕获任何未指定前缀的方法没有任何细节。如果我有一个目录为dir1/和dir2/的S3 bucket,通知配置如下: <NotificationConfiguration> <TopicConfiguration> <Topic>arn:aws:sns:us-east-1:123412341234:sns-notify-dir1</Topic
<NotificationConfiguration>
<TopicConfiguration>
<Topic>arn:aws:sns:us-east-1:123412341234:sns-notify-dir1</Topic>
<Event>s3:ObjectCreated:*</Event>
<Filter>
<S3Key>
<FilterRule>
<Name>prefix</Name>
<Value>dir1</Value>
</FilterRule>
</S3Key>
</Filter>
</TopicConfiguration>
<TopicConfiguration>
<Topic>arn:aws:sns:us-east-1:123412341234:sns-notify-dir2</Topic>
<Event>s3:ObjectCreated:*</Event>
<Filter>
<S3Key>
<FilterRule>
<Name>prefix</Name>
<Value>dir2</Value>
</FilterRule>
</S3Key>
</Filter>
</TopicConfiguration>
</NotificationConfiguration>
我意识到替代的解决方案会起作用,比如只编写一个通用的SNS,让我的实用程序确定是否要侦听它,以及将所有内容发送到lambda函数以确定要触发哪个通知。但是,如果可能的话,我喜欢尽可能干净地编写代码
请让我知道,如果更多的细节将有所帮助,谢谢 为什么前缀/后缀组合重叠的配置无效?当一个S3事件发生时,通知两个不同的SQS队列会有什么危害?为什么AWS设计成这样?为什么前缀/后缀组合重叠的配置无效?当一个S3事件发生时,通知两个不同的SQS队列会有什么危害?为什么AWS设计成这样?
<TopicConfiguration>
<Topic>arn:aws:sns:us-east-1:123412341234:sns-notify-generic</Topic>
<Event>s3:ObjectCreated:*</Event>
</TopicConfiguration>
dir1/ -> Handled by sns-notify-dir1
dir2/ -> Handled by sns-notify-dir2
/ -> How can I handle with sns-notify-generic?
dir3/ -> How can I handle with sns-notify-generic?