S3 Lifecycle Policy Builder Tool - Generate JSON / XML / CloudFormation for S3 Rules
First Published:
Last Updated:
All processing is performed entirely in your browser using client-side JavaScript. No data is transmitted to any server. Your lifecycle configuration never leaves your device.
- This tool is provided "AS IS" without any warranties of any kind.
- The author accepts no responsibility for misconfigured lifecycle rules that cause data loss or unexpected storage costs.
- The validation is advisory only; always review the generated configuration against the current AWS S3 documentation before applying it to a production bucket.
- Always keep backups of your original data before applying lifecycle rules.
- By using this tool, you accept full responsibility for any outcomes.
This tool uses client-side JavaScript for all processing. No data is transmitted to servers, no files are uploaded online, all processing happens locally in your browser. Once loaded, this tool continues to work even without an internet connection. For more details, please refer to our Web Tools Disclaimer.
Preset Rules
Click a preset to append a ready-made rule you can then customize.
Validation
Generated Output
// Add a rule to see the generated output.
Features
- Visual rule builder: Add multiple lifecycle rules with Prefix, Tag, and Object-size filters combined via the
Andoperator. - Full action coverage: Current version transitions, noncurrent version transitions, expirations, noncurrent version expirations, and abort incomplete multipart upload.
- Three output formats: JSON for
aws s3api put-bucket-lifecycle-configuration, XML for the S3 REST API, and CloudFormation YAML forAWS::S3::Bucket.LifecycleConfiguration. - Built-in validation: Minimum transition days (STANDARD_IA / ONEZONE_IA 30d, GLACIER_IR 90d), duplicate storage class detection, expiration vs. transition ordering, and IA-tier + < 128KB cost warning.
- Ready-made presets: Log archival, IA migration, temp cleanup, noncurrent version cleanup, and abort incomplete multipart upload patterns.
- Client-side only: No data is transmitted; everything is computed locally in your browser.
How to Use
- Click a preset button to append a ready-made rule, or click + Add Rule to start from a blank rule.
- Give each rule a unique Rule ID and set the Status to Enabled or Disabled.
- Configure the Filter using Prefix, Tags, ObjectSizeGreaterThan, or ObjectSizeLessThan. Multiple filter criteria are automatically combined with the
Andoperator. - Add one or more Transitions (current version) and Noncurrent Version Transitions with a storage class and either Days or Date.
- Optionally set Expiration, Noncurrent Version Expiration, and Abort Incomplete Multipart Upload values.
- Review any warnings or errors listed under Validation.
- Switch between JSON, XML, and CloudFormation YAML tabs to see the corresponding output and copy or download it.
Important Notes
- Minimum storage duration: Objects transitioned to STANDARD_IA, ONEZONE_IA, or GLACIER_IR are billed for the minimum storage duration of that class even if deleted earlier.
- Transition order: AWS requires transitions to move toward colder storage classes; the tool warns if the sequence looks inverted.
- Days and Date are exclusive: You can use either Days or Date for a transition or expiration, but not both.
- 128KB minimum billable size: Objects smaller than 128KB are billed as 128KB for IA-tier storage, so transitioning very small objects to IA is usually not cost-effective.
- Noncurrent versions: Noncurrent version rules only apply to buckets with versioning enabled.
- Not a substitute for AWS validation: The generated output is syntactically correct but should be reviewed with the current AWS S3 documentation before applying to production buckets.
References:
Tech Blog with curated related content
Web Tools Collection
Written by Hidekazu Konishi