import boto
from boto.s3.lifecycle import Lifecycle, Transition, Rule
c = boto.connect_s3("xxx", "xxxx")
bucket = c.get_bucket("testme162")
## all objects under logs/* to Glacier after 1 day
to_glacier = Transition(days=1, storage_class="GLACIER")
rule = Rule("ruleid", "logs1/", "Enabled", transition=to_glacier)
lifecycle = Lifecycle()
lifecycle.append(
(
Read more... )