1
votes

Present Scenario ( Fixed ): One SQS getting event from S3 Bucket's create event with some Prefix ,this SQS is again used by some other services

Objective: To get S3 create event notification from the same s3 bucket (same prefix) where SQS is listening to and then trigger a Lambda Function.

Workaround thinking of: Listen and filter(based on the body of messages) the configured SQS queue messages ,get the path of document in S3 for which create event got registered in SQS and trigger my lambda

Problem: Other Services are not able to receive the message to process,as SQS queue messages are being read by my lambda.

what could be all possibilities ?

1
You should use SNS to fan-out the messages from S3 to multiple SQS queues.Mark B

1 Answers

2
votes

As @MarkB indicated, SQS is not very well suited for the task. The focus should be placed on SNS.

AWS has several resources and architectures on how SNS can be used to filter messages and made them available to selected receivers. For example, the following AWS blog post can be useful:

The other good AWS tutorial about fan-out design patter is below: