Create Bucket
Updated at:2025-11-03
The following code can be used to create a bucket:
Python
1if not bos_client.does_bucket_exist(bucket_name):
2 bos_client.create_bucket(bucket_name)
Note: Since the bucket name is unique across all regions, it is necessary to ensure that the bucketName is not the same as the BucketName on all other regions. Bucket naming follows the following conventions:
- Only lowercase letters, numbers, and hyphens (-) are allowed.
- Must start with a lowercase letter or a number.
- Length should range between 4-63 bytes.
