I have two Amazon S3 buckets set up for cross-region-replication. Whenever there is an upload in the source bucket with a specific prefix, I need the respective data to be replicated to my "processing bucket" in a different region. However I need to know at least some information about the original source bucket after the replication process, because I want to set up multiple buckets including replication with the same destination bucket, while the processing is going to be done via lambda events.
I thought about getting this to work with tagging but I can't find ways to automatically tag uploaded data containing a specific prefix before (or after?) they are replicated.
The only thing closing in on this topic I could find was https://docs.aws.amazon.com/AmazonS3/latest/dev/batch-ops-put-object-tagging.html, but I can't make much of that, as I'm not sure, if this is what I'm searching for, especially regarding the automatic replication functionality.
To recap: I want to process data via lambda events and differentiate their origin by information included in the event's json data (originating from specific tags on the S3 file for example).
What is the best way to approach this?