Create Life Cycle Policy In S3 Storage On AWS Cloud

Create Life Cycle Policy In S3 Storage On AWS Cloud

We can create a lifecycle policy to delete and the expiration of data in AWS S3 storage. Suppose we have a bucket on S3 and there’re lots of objects inside it. We need to move the data storage class to the new storage class using the life cycle policy create

You can change the values according to your requirements. Go to the bucket which you have created then click on Management.

configure policy in s3 bucket

Check Out: Top 11 Split Commands To Break Large File Into Small Files

Click on lifecycle rule

policy to delete automatically data in s3

Give it a name and you can either choose to limit the scope or apply to all objects to the bucket. In This case, This policy will only be applicable for *.pdf files in this object.

I have chosen this policy for all the objects inside the bucket.

s3 delete policy

Check Out: Troubleshoot Linux Server Performance Using vmstat Command

Once you choose it, if you have enabled versioning in the bucket, you will see the current as well as previous versions. You can either choose both or one of them to apply the policy. I have chosen the current version only.

aws lifecycle policy

Click on add transition. You have to define the days here. The data
will be moved after 60 days of creation from Standard -IA to the
transition to one Zone-IA. You have chosen the transition class here.

s3 lifecycle expiration

Check Out: How To Create Elastic File System(EFS) On Amazon Cloud

It will automatically delete the object after 725 days.

life cycle policy

The policy has been created.

create life cycle policy

You’re done. how to create policy in aws s3 delete aws expiration lifecycle

Share on:

I'm the founder of Curious Viral. I hope this blog will provide you complete information about Linux Technology & I would like to share my technical knowledge with you which I have learned during this period.

Other Posts You May Like...

2 thoughts on “Create Life Cycle Policy In S3 Storage On AWS Cloud”

Leave a comment