So in my company theres two S3 buckets, one stores all of the reports and another is supposed to store a particular type of report called accountingEOMReport which is ran once a month, right now we're trying to pull the EOM reports from bucket 1 but the code isn't saving it there, instead it's saving to bucket 4 (this wasn't a problem before and only started after we began using S3). What I want to do is create some sort of policy rule or Lambda function to automatically search bucket for for a particular type of file name (eg EOMReport or something like that) and move those to bucket 1, maybe once per day or a few times a week. This report is run once or a few times a month so maybe to the storage option that works best for that but that can still be retrieved within a few hours max worst case scenario.
You can:
EOMReport
, then the Lambda function should:
This will happen immediately upon creation of the object, so there is no need to schedule it. AWS Lambda is charged per-millisecond and there is a monthly Free Tier for AWS Lambda. As a result, this solution will likely not cost you anything.