-
-
Save arbabnazar/8f36938e0adde6feb4f2 to your computer and use it in GitHub Desktop.
Set up simple lifecycle config for a bucket
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from boto.s3.lifecycle import Lifecycle, Transition, Rule | |
import boto | |
c = boto.connect_s3() | |
b = c.lookup('mybucket') | |
t = Transition(days=0, storage_class='GLACIER') | |
r = Rule('foo rule', 'foo', 'Enabled', 1, t) | |
l = Lifecycle() | |
l.append(r) | |
b.configure_lifecycle(t) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment