简体   繁体   中英

AWS Lambda and S3 trigger event data

I have a lambda function that I need to run eveytime there is a change in my s3 Bucket. I have added the trigger and it is working just fine, but I was wondering if there is any way to limit the scope the lambda function is to be run... for example Instead of running over the entire bucket, it runs only in the folder (inside the bucket) that change has been made?! or something like that..!

You can specify rules:

- s3:
  bucket: photos
  event: s3:ObjectCreated:*
  rules:
    - prefix: uploads/
    - suffix: .jpg

See the functions/events/s3 section in the yml definition .

根据此AWS公告 ,您可以为S3事件触发器添加前缀或后缀限制。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM