I have an S3 bucket with img
, mov
, and tmp
directories. I would like everything added to tmp
to be removed automatically once it's over three days old. So I set up object expiration rules on my bucket like so:
- prefix: "tmp/"
- expiration: 3
The problem is, while the files inside tmp
are removed on schedule, tmp
itself also matches this prefix (dispite the trailing slash) and gets deleted every three days.
Is there any prefix that will match the contents of tmp
, but not tmp
itself? Something like "tmp/*" (though that doesn't work)?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…