I am working on an e-commerce website.
I store product photos in an s3 bucket. Once the product is deleted, I also delete the photos from s3 bucket.
I have S3 bucket versioning enabled. I am not entirely sure how does versioning wortk?
Here are my assumptions:
- If a product photo is modified, the old photo is kept with an old version (so the old photo is never deleted)
- If a photo is deleted, AWS still keeps the deleted photo however it is marked as deleted
Are the above assumptions correct?
Now I want create a Lifecycle rule to move the old photos (deleted or the old version of modified photos) to a cheaper storage.
From S3 Console, I choose Management > Create lifecycle rule. I can see the following options:
- Move current versions of objects between storage classes
- Move noncurrent versions of objects between storage classes
- Expire current versions of objects
- Permanently delete noncurrent versions of objects
- Delete expired object delete markers or incomplete multipart uploads
I am not clear what does noncurrent version mean?
Is a deleted photo a noncurrent version? What about a product photo which remains active for a very long time (say 1 year) without being modified or deleted... does it ever become noncurrent, because it has been sitting in the bucket for too long?
I think the option that I want is this:
Does the above rule move deleted and modified photos to a cheaper storage, after 30 days?