Amazon Simple Storage Service: Object Versioning

We all aware about document versioning importance and might be aware of source code versioning concept. Amazon S3 also supports versioning for objects which uploaded to S3 bucket.  Versioning enables to keep multiple version of same documents and also protect from unintended overwrites and deletions or to archive objects. Objects/files can be retrieved from previous versions.

  • Versioning feature is disabled by default
  • Each object in bucket has version ID, regardless whether versioning is enabled or not
  • Versioning disabled bucket, version ID for an object to be set to "Null"
  • Versioning enabled bucket, Objects' version id will be set to unique version Id during upload/create time.
  • When enabling versioning on a bucket, which has existing objects, if any, in the bucket are unchanged: the version IDs (null), contents, and permissions remain the same. Only newly objects added after versioning enabled will have unique version Id. 
  • Unique version IDs are randomly generated, Unicode, UTF-8 encoded, URL-ready, opaque strings that are at most 1024 bytes long
  • With versioning enabled bucket, rather than updating the existing object, new object to be added with new unique version Id with the same key and marked as the current version.
  • If DELETE an object from a bucket, all versions remain in the bucket and Amazon S3 inserts a delete marker only. This functionality prevents from accidentally overwriting or deleting objects and affords the opportunity to retrieve a previous version of an object
  • How does delete work, "get object" methods always returned the current version of object from bucket, if object get  marked as deleted, then it will return the 404 Not Found error message
  • By specifying exact version id into getting object method, an object can be retrieved. 
  • Objects can be deleted permanently by specifying the version id as well, but must with owner access permission of the object.
  • For preventing accidental delete or overwrite, MFA can be enabled as two-level security. The bucket owner must include two forms of authentication in any request to delete a version or change the versioning state of the bucket
Most important points for versioning enabled bucket
  1. The SOAP API does not support versioning. SOAP support over HTTP is deprecated, but it is still available over HTTPS. New Amazon S3 features will not be supported for SOAP
  2. Bucket must be analyzed for multiple versions of objects, may be in millions, user may experience Http 503 for Amazon S3 PUT or DELETE object requests 


Popular posts from this blog

AWS Identity and access management (IAM)