4

I want to use trigger multiple lambda functions from a single s3 bucket but i'm getting overlap error I in fact found a solution that i need to use SNS for the same. The architecture would be like enter image description here

  • Is there any other solution to it?
  • if not how to implement it using SNS?
1
  • A new option is to use the recently made available S3 notification using Event Bridge aws.amazon.com/blogs/aws/… Commented Jul 19, 2022 at 2:24

1 Answer 1

6

Is there any other solution to it?

Probably, but SNS is the correct solution to "fan out" messages to multiple consumers.

if not how to implement it using SNS?

Exactly like in the diagram you posted. You would configure S3 to send new object notifications to an SNS topic, and you would configure each Lambda function to subscribe to the SNS topic.

Sign up to request clarification or add additional context in comments.

4 Comments

Thanks Mark. Can you help me with which one to use SNS or SQS. Because in SNS i will get event in the form of msg which i need to parse later on, but in SQS suppose i would get the required event which can be directly passed.
SQS will not send a single message to multiple Lambda functions. Each message would only be processed by one of the Lambda functions when using SQS. You cannot "fan-out" messages with SQS.
Thanks this will help
Hey Mark, Just trying to understand, how can we introduce fault tolerence here. Like how can we retry, is there any possibility that messages being dropped between S3 -> SNS and SNS -> Lambda

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.