s3 Glacier Transition

0

How can I use S3 lifecycle policy to move to glacier in a bucket if I have thousands root objects and few folders. I don't want objects in the folders to transition to deep glacier only the root objects.

gefragt vor 2 Jahren434 Aufrufe
1 Antwort
0

S3 lifecycle is based on Tag or Prefix. So whatever folders or root objects, we need to find the pattern of root objects names and put a lifecycle for it.
If there's too much diversity in the pattern of root objects names, what about create a list of root objects excluding specified "folder" prefix. After tagging these objects, put a lifecycle for the Tag to transfer these objects to Glacier.
Also mentioning that S3 doesn't have real folders:

e.g. bucket/--
/abc.txt
/abc.jpg
/a/abc.jpg
/a/abcd.exif
We just need to create a lifecycle for prefix "abc", then the root files started with abc will be transitioned to Glacier.

e.g. bucket/--
/abc.txt
/abc.jpg
/abc/abc.jpg
/abc/abcd.exif
If we have patterns like these, we can create the lifecycle with prefix "abc." for lifecycle or we can create a list of files excluding "abc/" and use the list for S3 batch to add Tags for these objects. Finally we put a lifecycle for the Tag.

AWS
Yuxiang
beantwortet vor 2 Jahren

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