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
ESPERTO
Tedy_T
posta 4 anni fa2887 visualizzazioni
1 Risposta
0
Risposta accettata

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

con risposta 4 anni fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande