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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠