I am running a website on AWS S3 bucket. I have to update the website once in a while. At the moment, when I do the deployment I just copy the built files to my bucket and override existing ones.
Is there a way to do some versioning on these deployments? I know there is a built-in versioning S3, but it is only for individual files I think.
The best option would be that every deployment is tagged with git commit-id and I could rollback to a particular commit-id if needed.
Any ideas? Already tried to name directories with commit-id -prefix, but the problem is that index.html has to live in root dir.
Versioning in Amazon S3 is a means of keeping multiple variants of an object in the same bucket. You can use the S3 Versioning feature to preserve, retrieve, and restore every version of every object stored in your buckets.
Versioning in AWS S3 can be described simply as keeping incremental copies of the same file as you make modifications. In S3 versioning stores, all versions of an object and including all write even if you delete an object. S3 versioning is a great back up tool.
If you want to use some solution for non-technical users who could rollback the previous version just by doing some clicking action in AWS console you can try to change Index document config.
For example, you have structure in bucket like this:
It means, that you could only change the config in Bucket properties -> Static website hosting -> Index document -> from v2/index.html to v1/index.html.
Sounds like "just doing some clicking action in AWS console"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With