...
Spinup S3 buckets allow versioning of objects, which is disabled by default but can be enabled. Versioning creates separate versions of each object upon modification and retains the latest version even after deletion. This provides the flexibility to view or revert to any version but uses more storage as objects are never fully deleted. Versioning can be suspended, which only affects future changes, not existing versions. For more on S3 versioning, visit AWS's versioning documentation.
Manage via AWS CLI
Manage Versioning via AWS CLI
Check Versioning Status:
Code Block language bash aws s3api --profile spinup000123-mybucket get-bucket-versioning --bucket spinup000123-mybucket
Look for
"Status": "Suspended"
or absence of status, indicating versioning is disabled.Enable Versioning:
Code Block language bash aws s3api --profile spinup000123-mybucket put-bucket-versioning --bucket spinup000123-mybucket --versioning-configuration Status=Enabled
Disable Versioning:
Code Block language bash aws s3api --profile spinup000123-mybucket put-bucket-versioning --bucket spinup000123-mybucket --versioning-configuration Status=Suspended
List All Versions: Use the following command to list all versions of an object:
Code Block language bash aws s3api --profile spinup100-old-style list-object-versions --bucket spinup100-old-style --prefix beta.png
...