Learn How to Create S3 bucket Lifecycle Policy in Easy Steps.

How to create S3 bucket lifecycle policy

First, let’s take an example of an organization that stores the application logs in the S3 Standard storage class by default and they have a set of rules to access logs like:

  • Application logs access frequently till 30 days.
  • After 30 days logs are infrequently accessed, and after 60 days logs are not required.
  • To meet the organization’s compliance rules, they have to maintain the logs for 465 days.

In order to optimize the storage cost and implement above use case, follow the Steps to configure S3 bucket object life cycle policy.

1. Sign in to the AWS Console and open the Amazon S3

2. Select the bucket in which you want to create a lifecycle policy.
Go to the Management tab, and then select Add lifecycle rule.

Learn How to create S3 bucket lifecycle policy. This image shows the AWS console for easy creation.

3. In the life cycle rule wizard, type a name (i.e. cloudiofy-logs-lifecycle-rule) for your rule and click on the Next

Step 2 of our guide: Select the lifecycle rule, as shown in this image of the AWS Management Console

4. Configure lifecycle rules to move the objects:

  • From Standard Storage class to Standard-Infrequent Access after 30 days of creation
  • From Standard-Infrequent Access to S3 Glacier after 60 days of creation
Configuring lifecycle policy settings Name and Scope for an S3 bucket in the AWS Management Console

5. Configure lifecycle rules to delete all logs 465 days after creation.
Clean up incomplete multipart uploads: It is a recommended best practice setting and then click on the Next.

Configuring lifecycle policy settings Transitions  for an S3 bucket in the AWS Management Console

6. Under review verify your configuration settings and click on the Save. After saving a screen visible with success message.

Effortlessly create an S3 bucket lifecycle policy with our guide. This image indicates that the policy configuration is complete for the defined bucket

Lifecycle policy configuration completed for the defined bucket (i.e.  cloudiofy-application-logs)

Learn How to Create S3 bucket Lifecycle Policy in Easy Steps.