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 Resposta
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
ESPECIALISTA
respondido há 5 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas