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
asked 4 years ago2826 views
1 Answer
0
Accepted Answer

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

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions