Why can I send AWS S3 bucket events to only one AWS lambda?

Viewed 742

I have a S3 bucket, to store objects.

On the object creation event, I wish to send a specific category of objects to two lambdas, in parallel:

  1. my_email_lambda
  2. my_logging_lambda

I set the rule as follows:

Rule 1:
  Prefix: /my/folder
  Suffix:
  Send to: lambda
  Lambda: my_email_lambda

Rule 2:
  Prefix: /my/folder
  Suffix:
  Send to: lambda
  Lambda: my_logging_lambda

When I try to do this, 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.

Why is this ambiguous? I want to send the events to two separate lambdas. If this were a move operation, then we could consider this setup to be ambiguous. This is an event notification operation, though. This is not ambiguous. If the operation is unsupported, the error message should state this instead.

1 Answers
Related