Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request - Add Bucket Lifecycle Configuration for Version Expiration #6

Open
jon-lindner opened this issue Sep 20, 2018 · 0 comments
Open

Comments

@jon-lindner
Copy link

On the Version’s option for the Buckets, add a section to Enable - Bucket Lifecycle Versioning Expiration for Current and/or NonCurrent Objects.

You would just be allowing a checkbox of Enabled for Version Expiration for either Current Object or Non-Current objects and receiving an input for number of Days to set expiration policy. The selection captures can then be passed as the following command:
** Apply Bucket Lifecycle using AWS CLI
aws s3api put-bucket-lifecycle-configuration --bucket agents --lifecycle-configuration file://expire-lp.json --endpoint-url http://ecs-ip:9020

Depending on what you use on the backend to pass the S3 commands, the Day integer value would have to be added to the JSON or XML lifecycle configuration policy. I have attached the JSON one that I made and tried to set just the non-current and current version expiration.

NonCurrentExpiration - JSON
{
"Rules": [
{
"ID": "Expire NonCurrent 5 Days",
"Prefix": "",
"Status": "Enabled",
"NoncurrentVersionExpiration": {
"NoncurrentDays": 5 }
}
]
}

CurrentVersionExpiration - JSON
{
"Rules": [
{
"ID": "Expire Current 5 Days",
"Prefix": "",
"Status": "Enabled",
"Expiration": {
"Days": 5 }
}
]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant