'S3 Event Prefix for Subfolders
I set up an event listener on S3 that fires to a lambda function for ObjectCreate events. The S3 bucket considered has a subfolder dev/subfolder-a/ and we would like to only listen to new objects created under dev/subfolder-a/.
We tried setting up the prefix as dev/subfolder-a/ on the event notification, but the events never fire when we upload new files in subfolder-a
Now if we change the prefix to simply dev/, we receive the events but contains new uploaded files in all other subfolders (say dev/subfolder-b/ and dev/subfolder-c/).
How can we specify a prefix for an S3 event notification to only consider events happening in a specific subfolder (or even sub-subfolders)?
Solution 1:[1]
Are you sure the upload to dev/subfolder-a/ is successful? Documentation states that:-
You will not receive event notifications from failed operations.
I just tested your workflow in the AWS Console (only difference is that my event is pushed to test SQS queue) and through some code and it worked as expected.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 |
