Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Negation of a folder in S3 Event Notification

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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?

>Solution :

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading