S3 file drop fire multiple Lambdas

0

Have a customer who uses an application to drop a data file from Salesforce into an S3 bucket. Once the file is dropped, they have a Lambda that fires and does some processing.

Customers question is there a way to fire multiple Lambdas from the same trigger? In this case, the creation of the file in the bucket. Doesn't look like this is supported today, any work arounds?

Looked at doing this via CloudWatch but it doesn't support prefix/suffix lookup on the file.

2 Risposte
0
Risposta accettata

instead of triggering a Lambda from an S3 event, you can also chose SNS as event destination. Lambda supports SNS as event source and SNS allows you to have multiple subscriptions for one topic. The new architecture would look like:
S3 -> SNS -> multiple Lambdas

AWS
con risposta 5 anni fa
0

Having just answered a related question posted 9 DEC 2021, I found this 3-year old answer. For those looking at this answer in 2021 and beyond, there is another good answer, too. That answer is: Try using EventBridge

There are 10 EventBridge AWS Events for S3 including CreateObject. An EventBridge Rule can be set up to trigger multiple, separate Lambda Functions any time an object is created in S3 aka doing a file drop in S3. Each AWS Event in EventBridge has its own schema, for example: aws.s3@CreatedObject is the EventBridge schema for the AWSEvent that represents a new object being added to an S3 bucket. Using EventBridge for the Event Notifications in S3 to trigger Lambda Functions, one might find more capable solutions especially given that an EventBridge Rule can have matching patterns to filter the AWS Events giving more granular control over the post-processing of the S3 Event.

TheSpunicorn

con risposta 2 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande