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.

asked 2 years ago423 views
1 Answer
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
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions