Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can EFS be used as an event source for triggering a Lambda function?

I’ve successfully created a Lambda function that can be triggered by an S3 file upload to a certain bucket and then downloads that file to EFS. I was wondering if the opposite workflow is possible, such that, a file uploaded to a given EFS directory would trigger Lambda to upload that file to S3?

For instance, in the serverless.yml or CloudFormation template I use to deploy the former workflow, the trigger event is defined as s3:ObjectCreated:*, but is there an equivalent for EFS?

If not, what is a good alternative solution for this workflow, setting up a trigger via CloudWatch?

like image 435
claudiadast Avatar asked Sep 02 '25 05:09

claudiadast


1 Answers

There is not an equivalent of S3 trigger for EFS. Inotify will not work with EFS either.

You could set up an EventBridge scheduled event that triggers a lambda to scan an EFS folder periodically, but it can become costly.

like image 71
jingx Avatar answered Sep 04 '25 20:09

jingx