- Newest
- Most votes
- Most comments
Hello.
It is possible to have more than one lifecycle policy.
However, if duplicate rules are set, the shorter rule takes precedence.
We also observed that in the case of complete duplicates, the behavior was such that the rules were being overwritten.
https://docs.aws.amazon.com/AmazonS3/latest/userguide/lifecycle-configuration-examples.html#lifecycle-config-conceptual-ex5
You might specify an S3 Lifecycle configuration in which you specify overlapping prefixes, or actions.
Generally, S3 Lifecycle optimizes for cost. For example, if two expiration policies overlap, the shorter expiration policy is honored so that data is not stored for longer than expected. Likewise, if two transition policies overlap, S3 Lifecycle transitions your objects to the lower-cost storage class.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 10 months ago
Thank you, I will take a look at that!
Perhaps the rules you are trying to set up would be overwritten if set up at the same time. If you are going to do this, it would be better to separate folders for objects to be kept for 90 days and for 365 days, or tag the objects. https://docs.aws.amazon.com/AmazonS3/latest/userguide/object-tagging.html