Using Boto, you can create an S3 bucket and configure a lifecycle for it; say expire keys after 5 days. I would like to not have a default lifecycle for my bucket, but instead set a lifecycle depending on the path within the bucket. For instance, having path /a/ keys expire in 5 days, and path /b/ keys to never expire.
Is there a way to do this using Boto? Or is expiration tied to buckets and there is no alternative?
Thank you
After some research in the boto docs, it looks like using the prefix parameter in the lifecycle add_rule method allows you to do this.
Setting a lifecycle for a path within a bucket