If we added a field for each entry as to when the record itself was created, then we could have AWS TTL do the pruning automatically.
I think we will want a "entry last written" mod time field in DDB, but I don't think we can use S3's TTL feature without breaking the "all ancestors of any path P in DDB must be present" invariant. I chatted with my friend that works on the DynamoDB team and he did not believe that their TTL deletion feature was strongly ordered enough to guarantee it, even if we could ensure we always wrote ancestors before children. Maybe there is another algorithm I'm not thinking of though.
I do think we want a v2 prune implementation for dynamo which works better (i.e. actually expires directories properly). I think that the authoritative mode support for dynamodb will be a big motivator for this, as if you are relying on DDB as source of truth for listings, then reliable expiry of stale data becomes more important. I've also been thinking about the online algorithm variant of prune (doing it on demand in client, probabilistically / randomized perhaps, or on access).