Home › Forums › AWS › AWS Certified Solutions Architect Associate › AWS S3 versioning
-
Hello,
I’m wondering how the following case is handled:
we have a bucket with a few objects and later on, we turn on versioning.
I’m wondering whether there will be available 2 versions after PUT of an object (id=null, because it was created before versioning) i.e. null version and version with generated id. In other words – if object is created before versioning, can I keep this null-version and new versions so that I avoid the inital version of object being replaced with updated object that will have version id?
-
Hi Radoslaw-slowinski,
Thank you for your message.
Each object has a version ID, whether or not S3 Versioning is enabled. If S3 Versioning is not enabled, Amazon S3 sets the value of version ID to null. If you enable S3 Versioning, Amazon S3 assigns a version ID value for the object. This value distinguishes it from other versions of the same key.
When you enable S3 Versioning on an existing bucket, objects that are already stored in the bucket are unchanged. The version IDs (null), contents, and permissions remain the same. After you enable S3 Versioning for a bucket, each object that is added to the bucket gets a version ID, which distinguishes it from other versions of the same key.
Let us know if you need further assistance. The Tutorials Dojo team is dedicated to helping you pass your AWS exam!
Best Regards,
JM @ Tutorials Dojo
-
Thanks for your help!
do i understand corretly that initial version of object (with version=null) will be available after turning versioning and making update to it, right? 🙂
-
-
Hi Radoslaw-slowinski,
When you enable versioning, the initial version of object (with version=null) in your bucket do not change. What changes is how Amazon S3 handles the objects in future requests.
Best Regards,
JM @ Tutorials Dojo
Log in to reply.