mirror of
https://github.com/floci-io/floci.git
synced 2026-11-26 15:21:05 -05:00
A bucket with Object Lock is versioned for good. PutBucketVersioning with Suspended on such a bucket now answers 409 InvalidBucketState and leaves it Enabled, and PutObjectLockConfiguration on a bucket whose versioning is unset or suspended answers 409 InvalidBucketState and enables nothing, matching the AWS-recorded messages. CloudFormation goes through the same PutBucketVersioning path, so an update that suspends a locked bucket rolls back. Both checks run with the write under the bucket monitor, and CreateBucket with Object Lock now enables versioning and the lock in one step, so no concurrent request can leave a locked bucket suspended. Buckets stored in either state by an earlier release load as they were; the null-version protection for them is unchanged, and its tests now set that state on the stored bucket.