Pcornel
Storage · Object Storage

Lifecycle Policies

Cheat sheet · https://pcornel.dk/topic.php?topic=4170

Back to the Topic

Answer

Lifecycle policies automatically move objects to cheaper storage classes or delete them after a set age, and clean up old versions and incomplete multipart uploads, keeping object storage costs under control.

Remember

  • Rules act on age, prefix or tags.
  • Expire old versions too.
  • Clean up incomplete multipart uploads.

First checks

  • aws s3api get-bucket-lifecycle-configuration --bucket <b> — rules
  • aws s3api put-bucket-lifecycle-configuration --bucket <b> --lifecycle-configuration file://lc.json — set
  • storage class report — transitions

Verify in this order

object age/tags → rule → transition/expire

Where it usually breaks

First mismatch in DNS/TLS → authentication/signing → bucket/container policy → object key/version → gateway → backend placement → GET/HEAD read-back; preserve identity/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=4170

Confirmation

Confirm action

Continue?