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.
Click on lifecycle rule
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.
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.
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.
It will automatically delete the object after 725 days.
The policy has been created.
You’re done. how to create policy in aws s3 delete aws expiration lifecycle