0

How to add a trigger for an s3 folder?

I can add triggers for a bucket from my serverless configuration.

But not sure how to add a trigger for a folder path?

    events:
      - s3:
          bucket: files          
          event: s3:ObjectCreated:*
          existing: true
Exploring
  • 2,493
  • 11
  • 56
  • 97

1 Answers1

2

You would have to setup a prefix as shown in the docs:

    events:
      - s3:
          bucket: files          
          event: s3:ObjectCreated:*
          existing: true
          rules:
            - prefix: your-folder/
Marcin
  • 215,873
  • 14
  • 235
  • 294