Home > Net >  S3 Lifecycle Policies
S3 Lifecycle Policies

Time:01-02

I have objects in an s3 bucket prefix called foo/. If I move the objects to another prefix using the aws cli mv command called bar/ which has a lifecycle policy on it to expire objects older than 60days, would the objects 'age' reset to 0 once it lands in the bar/ prefix or would it take into account the time it spent in the foo/ prefix?

I do not think it would restart the object lifetime but I would like to be 100% sure.

CodePudding user response:

When you move a file, S3 deletes the original file and copies it to the new location under the hood.

Therefore, the age will reset to zero when you move the objects from one prefix to another.

  • Related