--- title: "Enable File Versioning for a Bucket" slug: "enable-file-versioning-for-a-bucket" updated: 2026-06-30T04:49:38Z published: 2026-06-30T04:49:38Z canonical: "docs.serversaustralia.com.au/enable-file-versioning-for-a-bucket" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.serversaustralia.com.au/llms.txt > Use this file to discover all available pages before exploring further. # Enable File Versioning for a Bucket To enable file versioning for an S3 bucket, we recommend installing the AWS CLI, found here [https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html). Once installed, run the configuration command, and enter your access key and secret key. ```shell aws configure ``` Now you can run the `put-bucket-versioning` command to enable versioning for any of your buckets. Keep in mind, once versioning is enabled for a bucket, it cannot be disabled. However, you can delete versions of individual objects to save storage space. ```shell aws s3api put-bucket-versioning --bucket example-bucket --versioning-configuration Status=Enabled ``` You can also use the `get-bucket-versioning` command to check the current versioning status of a bucket. ```shell aws s3api get-bucket-versioning --bucket example-bucket ``` This will return the versioning status for the `example-bucket` bucket. If versioning is enabled, the output will look something like this: ```json { "Status": "Enabled" } ``` Once versioning is enabled, you can make use of the `list-object-versions` command to see all available versions of your files. ```shell aws s3api list-object-versions \ --bucket example-bucket \ --endpoint https://s3.si.servercontrol.com.au ``` This will return a list of object versions, like this: ```shell { "Versions": [ { "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"", "Size": 0, "StorageClass": "STANDARD", "Key": "example.txt", "VersionId": "vht3sqYdwmtvDWd8ZfUxnqyGiz4txrx", "IsLatest": true, "LastModified": "2022-12-13T22:39:26.612000+00:00", "Owner": { "DisplayName": "ServersAustralia", } }, { "ETag": "\"d41d8cd98f00b204e9800998ecf8427e\"", "Size": 0, "StorageClass": "STANDARD", "Key": "example.txt", "VersionId": "MbqyXDyHRo7-dkxDNmSP-2gHDI9YroK", "IsLatest": false, "LastModified": "2022-12-13T22:39:25.131000+00:00", "Owner": { "DisplayName": "ServersAustralia", } }, ] } ```