S3 Prefix Regex

0

I'm planning to use s3 bucket with dynamic prefix name using cognito user id like this :

s3://erlogbookapp80030-dev/private/ap-southeast-1:6e615292-a755-4e40-8fa1-7125743abc17/

under the prefix I have 2 folder

  1. Labels
  2. Submissions

I'm trying to configure S3 Event to only trigger Lambda every time a file stored in the Submissions. I don't want file uploaded to Labels triggers the Lambda.

My understanding S3 event prefix doesn't support the regex / wildcard.

Want to confirm that & also looking for the alternative solution to implement such requirement?

AWS
EXPERT
Tedy_T
demandé il y a 4 ans2885 vues
1 réponse
0
Réponse acceptée

If you can control the process of appending a pseudo/unconventional extension to the file before being stored in /Submission then you can raise a trigger on that particular suffix instead of the prefix. Your Lambda can rename the file (omit the pseudo extension) and execute the rest of the function logic.

This is a simple alternative until wildcard support for prefixes materializes

répondu il y a 4 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions