简体   繁体   English

S3事件触发了不同的SNS主题

[英]S3 event trigger to different SNS topics

I have an event in an S3 bucket that is triggered on every object creation. 我在S3存储桶中有一个事件,该事件在每次创建对象时都会触发。 Now, I need to create another event that will only be triggered for specified subdirectory. 现在,我需要创建另一个仅针对指定子目录触发的事件。

When I attempt to do that, I get an error 当我尝试这样做时,出现错误

Configuration is ambiguously defined. 
Cannot have overlapping suffixes in two rules if the prefixes are overlapping for the same event type.

Since the first event is a catch-all, there is no prefix or suffix that I can specify to avoid this situation. 由于第一个事件是包罗万象,因此我可以指定没有前缀或后缀来避免这种情况。

Do I have any options for creation of different events to this bucket? 我有什么选择可以为此存储桶创建不同的事件吗?

Looking at this forum discussion , what you are asking is not supported. 此论坛讨论中 ,您所询问的内容不受支持。

Here's an alternative solution that could be used. 这是可以使用的替代解决方案 For your use case, 2 Lambda functions would have to be subscribed to the SNS topic. 对于您的用例,必须向SNS主题订阅2个Lambda函数。 One of them will work on the specified subdirectory, the other will act as your catch all. 其中一个将在指定的子目录上工作,另一个将作为您的全部捕获对象。

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

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