Turn on object versioning for a bucket.
Section: S3API Bucket Commands
Enable bucket versioning
bash
bash
aws s3api put-bucket-versioning --bucket my-bucket --versioning-configuration Status=EnabledExplanation
Versioning protects against accidental overwrites and deletes.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing S3API Bucket Commands
Get bucket versioning state
Inspect the versioning configuration on a bucket.
Get bucket encryption config
Read the default encryption settings on a bucket.