Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

  1. Check Versioning Status:

    Code Block
    languagebash
    aws s3api --profile spinup000123-mybucket get-bucket-versioning --bucket spinup000123-mybucket

    Look for "Status": "Suspended" or absence of status, indicating versioning is disabled.

  2. Enable Versioning:

    Code Block
    languagebash
    aws s3api --profile spinup000123-mybucket put-bucket-versioning --bucket spinup000123-mybucket --versioning-configuration Status=Enabled

  3. Disable Versioning:

    Code Block
    languagebash
    aws s3api --profile spinup000123-mybucket put-bucket-versioning --bucket spinup000123-mybucket --versioning-configuration Status=Suspended

  4. List All Versions: Use the following command to list all versions of an object:

    Code Block
    languagebash
    aws s3api --profile spinup100-old-style list-object-versions --bucket spinup100-old-style --prefix beta.png

...