James Wierzba
James Wierzba

Reputation: 17568

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

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.

Upvotes: 3

Views: 991

Answers (1)

qkhanhpro
qkhanhpro

Reputation: 5230

It is not supported. And agree that the error message is not good.

The reason, I think is just that they want to promote another practice: Fanout S3 Event Notifications to Multiple Endpoints | AWS Compute Blog

Upvotes: 4

Related Questions