Versioning helps protects your data against accidental or malicious deletion by keeping multiple versions of each object in the bucket,identified by a unique version ID.
Versioning is turned on at the bucket level
Once enabled,versioning can not be removed from a bucket;it can only be suspended
If you enable versioning you will get Current version files and previous version files in your bucket.
If you delete current version file,if will overwrite with a Delete Marker,if you want to get that object back to you S3 bucket,you can delete the delete marker
To enable versioning on bucket, navigate to properties of the respective bucket and select versioning and select “Enable versioning” option
Life cycle Management
By using Life cycle management we can automate the storage tiers in S3 buckets.
We can move objects from one storage class/tier to another storage class/tier based on our business requirements.
Here is the possible scenarios:
Steps to enable life cycle management rules:
Select the S3 bucket which we want to add life cycle rule
Go to management option after selecting the bucket
Select Add Life cycle rule and then give a valid name for the life cycle rule. We can add prefix,If LC rule will apply to the entire buckets objects
After entering“name and scope”we need to configure the transitions.We can configure transitions for current version and previous versions.Click“add transition”and enter the days count from“Object creation”.
For S3-IA We need to store the object for minimum of 30 days and for Glacier 60 days from object creation date.
In Next step we can configure object expirations
For current version Expiration creates a Delete Marker if Versioning is enabled on this bucket.
For Previous version object will delete permanently
This is there view status for the life cycle rule that we have created.Review the Life cycle rule and click on“Save”,Created life cycle rule will apply on bucket
By enabling logs we can track requests on our Amazon S3 bucket. Logging is off by default.You can enable it from bucket properties.
Every log will contains the below information
Request or account and IP address
Action(GET,PUT,LIST,and so forth)
Response status or error code