How to rollback to previous version in Amazon S3 bucket?


I upload folders/files by:

Is there a way to return/rollback to previous version?

Like git revert or something similar?

here the is test file that I uploaded 4 times.

How to get to previous version (make it the “Latest version”)

For example make this “Jan 17, 2018 12:48:13” or “Jan 17, 2018 12:24:30”
to become the “Latest version” not in gui but by using command line?
enter image description here


Here is how to get that done:

If you are using cli,

Get the object with the version you want.

Then perform a put object for the downloaded object.

Your old S3 object will be the latest object now.

AWS S3 object is immutable and you can only put and delete. Rename is GET and PUT of the same object with a different name.

Hope it helps.

Leave a Reply