1 Answer
- Newest
- Most votes
- Most comments
2
Hello.
Yes, I think the setup itself is easy.
You can use the configuration described in the following document to run Lambda when a file is uploaded to S3.
As a note, we recommend that you limit the prefixes that respond to event notifications so that Lambda will not be executed when copying files to another folder in the same S3.
https://docs.aws.amazon.com/lambda/latest/dg/with-s3-example.html

Thanks for the answer, but this is not what I needed. I already have a code in place. I need to grab a file(s) fropm a specific folder (prefix) and copy it somewhere else, but I don't know how to filtery by - for instance - CSV files because the directory tree is deep, the files dont land directly on the root of the buccket.
For example,
Salesforce pushes the data to S3 bucket A at: /data/14-03-2024/exports/metadata.csv.
I cannot change the path where the data lands, and I need to grab the "metadata.csv" file and : copy it to /resources/metadata-files/metadata.csv
I hope my request is clearer now :) Thank you in advance!