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ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ