Move file in s3 bucket after given time

0

How can I create a workflow where once a file is uploaded to my s3 bucket, I pass a variable time (may be 6h, 24h, 48h or other), and after that time, the file is moved to a different place?

1 回答
1

Hi,

It would be interesting to hear different approaches to find the most elegant/effective, first what came to my mind are:

Straightforward

  1. Use tags to add a time, after which file must be moved
  2. Use EventBridge scheduler to trigger Lambda, which will search all files with tag, compare it with the creation time and make decision if file must be moved. Remove tag after the move, so we are not triggering it anymore.

More effective

  1. Use DynamoDB with link to S3, creation time, set TTL to the record.
  2. Trigger Lambda when item deleted from DynamoDB to initiate move
profile picture
专家
已回答 5 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容