Search code examples
amazon-web-servicesaws-lambdaamazon-efs

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?


Solution

  • 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.