Setting an S3 Lifecycle configuration on a bucket - Amazon Simple Storage Service
Learn how to set an Amazon S3 Lifecycle configuration on a bucket programmatically or by using the Amazon S3 console.