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.

질문됨 5년 전743회 조회
2개 답변
0
수락된 답변

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
답변함 5년 전
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

답변함 2년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠