Skip to main content

put-bucket-versioning

The aws s3api put-bucket-versioning command is used for enabling or suspending versioning on an Astran S3 bucket. Versioning allows you to keep multiple versions of an object in a bucket, enabling you to preserve and retrieve every version of every object stored in your bucket. This helps protect against accidental deletions or overwrites.

Syntax

aws s3api put-bucket-versioning \
--bucket BUCKET_NAME \
--versioning-configuration Status="string"

Options

  • bucket: The name of the S3 bucket where versioning will be configured.

  • versioning-configuration: Container for setting the versioning state.

    • Status -> (string)
      • Enabled —Enables versioning for the objects in the bucket. All objects added to the bucket receive a unique version ID.
      • Suspended —Disables versioning for the objects in the bucket. All objects added to the bucket receive the version ID null.

See also the original AWS documentation.