-
Notifications
You must be signed in to change notification settings - Fork 127
Using S3 lifecycle
boopsie edited this page Feb 12, 2012
·
1 revision
First create an XML control file (lifecycle.xml):
<?xml version="1.0" encoding="UTF-8"?>
<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Rule>
<ID>1-day-rule</ID>
<Prefix>doomed</Prefix>
<Status>Enabled</Status>
<Expiration>
<Days>1</Days>
</Expiration>
</Rule>
</LifecycleConfiguration>
Then set the configuration:
$ aws put --md5 1day?lifecycle lifecycle.xml
$ aws get 1day?lifecycle
<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<Rule>
<ID>1-day-rule</ID>
<Prefix>doomed</Prefix>
<Status>Enabled</Status>
<Expiration>
<Days>1</Days>
</Expiration>
</Rule>
</LifecycleConfiguration>