Skip to main content

A Python library to manage S3 lifecycle policies and track changes in Delta format.

Project description

s3-lifecycle-delta

A small Python library to compute and apply deltas on AWS S3 lifecycle policies—especially focused on safe, declarative storage class transitions—with dry-run, validation, and minimal disruption.

Problem

AWS S3 lifecycle policies are typically applied by overwriting the entire configuration. That makes automated changes brittle, error-prone, and risky when you only want to tweak transitions (e.g., change from STANDARDGLACIER after 90 days) without accidentally deleting other rules.

This library:

  • Introspects the current lifecycle policy
  • Compares it to the desired policy (the "delta")
  • Shows what would change (dry-run)
  • Validates rules
  • Applies only the intended change safely

Features

  • Declarative lifecycle policy definitions (via Python / JSON)
  • Diff engine: detects rule adds / updates / deletes
  • Safe apply with dry-run
  • Validation of transition semantics (e.g., non-decreasing days)
  • Idempotent behavior
  • Pluggable for custom validation or rule logic

Quickstart

Install (editable for dev)

git clone https://github.com/your-org/s3-lifecycle-delta.git
cd s3-lifecycle-delta
pip install -e .

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

s3_lifecycle_delta-0.1.0.tar.gz (49.6 kB view details)

Uploaded Source

File details

Details for the file s3_lifecycle_delta-0.1.0.tar.gz.

File metadata

  • Download URL: s3_lifecycle_delta-0.1.0.tar.gz
  • Upload date:
  • Size: 49.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for s3_lifecycle_delta-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9f82c8540f3725d796cf02349a37910caa96dadf1c45ed0432690c8b3443d61e
MD5 03648de9a0390952ca9bc60cc9570af7
BLAKE2b-256 0823c36527592b06138c825b32046e68c7edc21a963863fced38a59fb8462f0d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page