Posty

Wyświetlanie postów z wrzesień, 2020

Lambda trigger on file upload to specified prefix

Obraz
  Backstory Another story based on assigned task. There are h undreds of source systems publishing files to S3 bucket. Each one to it's own prefix. Objects keys are prepared for Athena query optimization - data is partitioned. SNS topic is set as target for  S3 Event notification for " data/ " prefix. Third party system requires notification each time file is uploaded by any source system. The task is to invoke Lambda function whenever file is uploaded by one particular source system, let's call it SystemA. Other source systems shouldn't invoke any additional actions. S3 data structure looks like this: Idea 1 - not good not terrible As  S3 Event notification for every file uploaded to "data/" prefix is already set, I can subscribe Lambda function to SNS topic and verify object Key each time. Sounds  good and is simple to implement, but is not efficient. On 100 uploaded files, only 1 is published by SystemA and invoking Lambda for other 99 is just waste o...

Popularne posty z tego bloga

Cloudformation chalange #1 - conditional resources dependency

Lambda trigger on file upload to specified prefix