Amazon S3 - different lifecycle rule for "subdirectory" than for parent "directory" : <p>Let's say I have the following data structure:</p>

<ul>
<li>/</li>
<li>/foo</li>
<li>/foo/bar</li>
<li>/foo/baz</li>
</ul>

<p>Is it possible to assign to it the following life-cycle rules:</p>

<ul>
<li>/ (1 month)</li>
<li>/foo (2 months)</li>
<li>/foo/bar (3 months)</li>
<li>/foo/baz (6 months)</li>
</ul>

<p>The official documentation is unfortunately self-contradictionary in this regard. It doesn't seem to work with AWS console, which makes me somewhat doubtful that SDKs/REST would be any different ;)</p>

<p>Failing at that my root problem is: I have 4 types of projects. The most rudimentary type has a few thousand projects, the other ones have a few dozen. Each type I am obligated to store for a different period of time. Each project contains hundreds of thousands of objects. It looks more or less as:</p>

<ul>
<li>type A, 90% of projects, x storage required</li>
<li>type B, 6% of projects, 2x storage required</li>
<li>type C, 3% of projects, 4x storage required</li>
<li>type D, 1% of projects, 8x storage required</li>
</ul>

<p>So far so simple. However. Projects may be upgraded or downgraded from one type to another. And as I said - I have a few thousand instances of the first type so I can't write specific rules for every one of them (remember 1000 rule limit per bucket). And since they may upgrade from one type to another I can't simply insert them in a their own folders as well (ex. only projects from a particular type) or bucket. Or so I think? Are there any other options open to me other than iterating over every object, every time I want to purge expired files - which I would seriously rather not do because of the sheer number of objects?</p>

<p>Maybe some kind of file "move/transfer" between buckets that doesn't modify the creation time metadata, and isn't costly for our server to process?</p>

<p>Would be much obliged :)</p>
