Add S3 lifecycle policy example configuration

This commit is contained in:
timvisee 2021-01-26 20:14:09 +01:00
parent 6f1942a446
commit 4369baa258
No known key found for this signature in database
GPG key ID: B8DB720BC383E172

39
s3-lifecycle-example.xml Normal file
View file

@ -0,0 +1,39 @@
<?xml version="1.0" ?>
<LifecycleConfiguration xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
<!-- remove files for 1 day after 1 day -->
<Rule>
<ID>1skjet8gxudyans73v3p3d6hvq6yn3w02kq7931h81ohopd3</ID>
<Prefix>1-</Prefix>
<Status>Enabled</Status>
<Expiration>
<Days>1</Days>
</Expiration>
</Rule>
<!-- remove files for 7 days after 7 days -->
<Rule>
<ID>1skjet8gxudyans73v3p3d6hvq6yn3w02kq7931h81ohopd4</ID>
<Prefix>7-</Prefix>
<Status>Enabled</Status>
<Expiration>
<Days>7</Days>
</Expiration>
</Rule>
<!-- remove all files after 1 month -->
<Rule>
<ID>1skjet8gxudyans73v3p3d6hvq6yn3w02kq7931h81ohopd5</ID>
<Prefix/>
<Status>Enabled</Status>
<Expiration>
<Days>30</Days>
</Expiration>
</Rule>
<!-- remove aborted uploads after 1 day -->
<Rule>
<ID>1skjet8gxudyans73v3p3d6hvq6yn3w02kq7931h81ohopd6</ID>
<Prefix></Prefix>
<Status>Enabled</Status>
<AbortIncompleteMultipartUpload>
<DaysAfterInitiation>1</DaysAfterInitiation>
</AbortIncompleteMultipartUpload>
</Rule>
</LifecycleConfiguration>