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 Antwort
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
EXPERTE
beantwortet vor 5 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen