Home > front end >  Negation of a folder in S3 Event Notification
Negation of a folder in S3 Event Notification

Time:11-18

I have an S3 bucket with an event notification set up. The trigger of the event is All object create events and it basically runs a lambda function.

Inside the bucket, I have a bunch of folders, one for each operator in our system.

operator folders

Inside each operator's folder, there might be a folder called /exports/.

Objective

For objects created within the /exports/ folder (under the operator folder), I do not want to trigger the event.

Is that possible with S3?

CodePudding user response:

No, not supported afaik. You have three options:

  1. Use two buckets, one for the dropped items and one for the exports, where each bucket would have a BLAC/ prefix, a CUCC/ prefix etc.

  2. Restructure your prefixes within this one bucket to have: import/BLACC/ , import/CUCC/, export/BLACC/, export/CUCC/ and configure the upload trigger on the prefix import/

  3. Modify your Lambda function to treat objects with exports/ in their key as a no-op.

  • Related