Reusable
Reusable

Reputation: 1948

AWS Lambda: error creating the event source mapping: Configuration is ambiguously defined

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?

Upvotes: 44

Views: 47014

Answers (5)

Go to S3 bucket and go to event section. Delete the old event which is attached to other Lambda and you are good to create a new trigger.

Upvotes: 0

Sarthak Niwate
Sarthak Niwate

Reputation: 31

When you setup a lambda function and setup a trigger related to S3. The notification gets updated in the properties sections of that S3 bucket.

The mentioned error occurs when the earlier lambda function is deleted and you're trying to setup same kind of trigger again. This time the thing to note is, the S3 notification is still not deleted when you deleted the lambda function.

Goto S3 bucket > Properties > Event notifications and delete the old setting and then setup new trigger in the new lambda function trigger.

Upvotes: 1

Ridwaan Manuel
Ridwaan Manuel

Reputation: 1830

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

After 6 years nice to see some people still befitting from this answer, Here is a shamless plug to youtube video I uploaded 2022-12-13. https://www.youtube.com/watch?v=rjpOU7jbgEs

Upvotes: 170

sirlanceoflompoc
sirlanceoflompoc

Reputation: 1081

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

Upvotes: -1

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.

Upvotes: 5

Related Questions