S3 Lifecycle - Exclude Prefix

0

If I have a prefix Folder-1 which has a rule to keep contents live for 6 months and beyond 6 months to move the contents to Glacier. I would like to exclude Folder-1.1 and Folder-1.2 from this policy and have the data retained for 2 years. So, if I create an explicit rule on Folder-1/Folder-1.1 and Folder-1/Folder-1.2 to retain anything for 2 years, will the Glacier rule apply to all the rest of the folders except Folder-1.1 and Folder-1.2?

Prefix structure is as follows:

Folder-1/
    |-- Folder-1.1
    |-- Folder-1.2
    |-- Folder-1.3
    |-- Folder-1.4

I don’t think S3 supports exclude rules currently in the Lifecycle management. Any recommendations on how this can be achieved?

gefragt vor 4 Jahren5218 Aufrufe
2 Antworten
0
Akzeptierte Antwort

S3 is a key-value object storage service, there is no concept of ‘folder’ but 'prefix', for lifecycle rule if a rule is applied on a shorter prefix, it will take effect on the whole sub prefixes' objects, including 1.1 and 1.2. So yes applying the 1/ 'folder' will make 'folder' 1.1 and 1.2 being treated as the same as 1.3 and 1.4.

You can use object tag as the filter instead of prefix e.g creating a tag on all the objects with prefix 1/1.3 1/1.4 and use a single rule, or only applying lifecycle rules on 1/1.3 and 1/1.4.

AWS
beantwortet vor 4 Jahren
0

Is it possible to create the tag only for objects that should be excluded from file movement rules?

For example:

- folderA
---folder1
------- file1
------- file2
---folder2
------- file3
------- file4

If I want to exclude folder 1, I create the tag only on folder 1.

Can I use this approach? Or it is mandatory create a tag for each folders?

Thanks

luk3tt0
beantwortet vor einem Jahr

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