I have an AWS Lambda function, that I want to trigger when a user uploads a file to a subfolder in their S3 directory.
Every user has its own folder inside the 'private/' prefix, but when the user is uploading a file, it's put in a subfolder. This means that the trigger prefix should be 'private/userID/subFolder/', but I can't find how to define that the userID could be anything.
I have tried making the prefix 'private/*/subFolder/', but that doesn't trigger anything. If I make the prefix 'private/', the function will be triggered unnecessarily.
What is the best way to do this?