Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Add multiple suffix in s3 event notification from console

I need event notification when files with multiple extensions like .log, .txt, etc has been added to AWS s3 bucket. Can we add multiple suffix in s3 event notification from console ?

like image 388
Aarati Avatar asked Aug 26 '18 05:08

Aarati


1 Answers

You can create an Event in the Amazon S3 console, which can then trigger a Lambda function or send a message via SNS or SQS.

This configuration accepts a prefix (effectively a directory) and a suffix (eg .jpg).

Simply open the bucket, go to the Properties tab and click Events (down the bottom).

See: Configuring Amazon S3 Event Notifications - Amazon Simple Storage Service

You can create multiple Events, each of which has a different suffix. But you can't create one Event with multiple suffixes. An alternative is to create an Event for any suffix (any file type), and have the Lambda function examine the filename and exit if it has an uninteresting suffix.

like image 136
John Rotenstein Avatar answered Sep 28 '22 09:09

John Rotenstein