32
votes

There was an error creating the event source mapping: Configuration is ambiguously defined. Cannot have overlapping suffixes in two rules if the prefixes are overlapping for the same event type.

I created an event earlier from the GUI console 6-7 days ago and it was working fine. The next day the event just missing, i cant see it anymore at the Lambda console GUI. But every S3 objects still seems triggering the lambda function not a problem. If i cant see, it is not good; So i deleted the Lambda function, waited for 5-10 seconds before creating another new function. And now, i receive the same above when i try to create the event sources like this: enter image description here

When i click "Submit" the event sources tab says "You do not have any event sources for this function", Lambda does not get triggered; it means the entire application flow is now broken :(

The problem is almost the same as: "https://forums.aws.amazon.com/thread.jspa?messageID=670712????" But somehow i cant reply to that thread, so i created a new thread here instead. anyone encounter this issue?

In fact, i try to response to the existing AWS forum thread: https://forums.aws.amazon.com/thread.jspa?messageID=670712&#670712 but i keep getting this funny error: "Your message quota has been reached. Please try again later.". And i wasnt even posting anything, how can i use up my quota?

3
How are you setting up the event rule on your S3 bucket? Can you share the rules you have set? - James
@James, sure, updating the description with the even rule - Reusable
@Reusable that "quota has been reached" error is irritating. - User

3 Answers

133
votes

What I suspect is your S3 bucket may still be "linked" to the lambda function.

Maybe check your S3 bucket for events and remove them there, then try creating the lambda events again? i.e. S3 bucket-> properties-> Events

4
votes

The issue must be that the s3 bucket is already linked with the suffix/prefix you are trying to link. Remove the link in S3 and try again.

-1
votes

Here is a link to a youtube video profiling this issue and demonstrating the solution: https://www.youtube.com/watch?v=1Tfmc9nEtbU

Just as Ridwaan Manuel, you must remove the events by going to S3 bucket-> properties-> Events as the video shows.

Steps to reproduce this issue:

  1. Create a bucket and create a folder called “example/”
  2. Create Lambda Function
  3. Add S3 trigger to the lambda using the bucket from (1) with default settings
  4. Save the trigger
  5. Click Save and notice error
  6. Refresh the page and notice that the triggers disappeared
  7. Add the same bucket again and notice the ambiguous reference error