Menu
Amazon Simple Storage Service
Console User Guide (API Version 2006-03-01)

Lifecycle Configuration for a Bucket without Versioning

Important

This is the User Guide for the old Amazon S3 console. If you are looking for the User Guide for the new Amazon S3 console, see Welcome to the New Amazon S3 Console User Guide.  

An unversioned bucket maintains only one version of each object, and the lifecycle transition and expiration actions apply to these objects. For more information about lifecycle configuration rules, see Object Lifecycle Management in the Amazon Simple Storage Service Developer Guide.

Suppose you store videos in your bucket and these video objects use "videos/" as the key name prefix. The following example walkthrough creates a lifecycle configuration rule for a bucket that archives video files in the bucket 90 days after creation and then permanently deletes them 455 days after creation. The rule also automatically ends and cleans up any multipart uploads that have not completed after 7 days.

Example: Add a Lifecycle Configuration Rule to a Bucket without Versioning

  1. Sign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/.

  2. In the Buckets list, choose the bucket whose lifecycle configuration you want to configure, click Properties and then choose Lifecycle.

    
                Choose Lifecycle Property
  3. Choose Add rule.

    
                Lifecycle - Bucket without Versioning
  4. Select A Prefix and enter videos/ as the prefix to specify the subset of objects to which the rule applies, and then click Configure Rule. (In our example, entering "videos/" will apply the rule to all objects in the bucket's "videos" folder.)

    For more information about key name prefixes and how they map to folders, go to Object Keys in the Amazon Simple Storage Service Developer Guide.

    If you selected Whole Bucket the rule would apply to all objects in the bucket.

  5. You configure lifecycle rules by defining actions. In the Action on Objects section define the lifecycle actions:

    1. Select Archive to the Glacier Storage Class and enter 90 for the number days after an object's creation date that you want to archive the object to the Glacier storage class.

      Select Permanently Delete and enter 455 for the number of days after an object's creation date that you want the object to be permanently deleted. You cannot recover permanently deleted objects.

      Important

      Selecting Permanently Delete will not remove incomplete multipart uploads. You must select End and Clean up Incomplete Multipart Uploads as described in the next step to have incomplete multipart uploads removed.

      Verify that the illustration in the EXAMPLE section matches how you want your rule to work.

    2. It is a recommended best practice to select End and Clean up Incomplete Multipart Uploads. For our example, enter 7 for the number of days after the multipart upload initiation date that you want to end and clean up any multipart uploads that have not completed. Then choose Review.

      For more information about multipart uploads, see Multipart Upload Overview in the Amazon Simple Storage Service Developer Guide.

  6. Review and name your rule.

    1. (Optional) You can give your rule a name to identify the rule, if you want. The name must be unique within the bucket. By default, Amazon S3 will generate a unique identifier for the rule.

    2. Choose Edit next to Rule Target or Rule Configuration if you want to make changes.

    3. Choose Create and Activate Rule when all of the settings are as you want them.

  7. If the rule does not contain any errors, it is displayed in the Lifecycle pane.

For more information about modifying, disabling, or deleting an existing lifecycle configuration rule, see Maintaining Lifecycle Configuration Rules.